• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Jay_2004

Member
Feb 21, 2017
13
1
3
25
How are you meant to code when the coding program (in this case plugin) doesn't even work.
Code:
if {countdown.%arg-2%} is not set:
                                set {countdown.%arg-2%} to "no"
                            loop all players in world "Spleef":
                                if {arena.%loop-player%} is "%arg-2%":
                                    send "{@p} &6%player% &3has joined the arena. &7&o(%{players.%arg-2%}%/%{spleef.maxplayers}%)" to loop-player
                            send "%{players.%arg-2%}% %{spleef.minplayers}%" to console
                            if {players.%arg-2%} is greater than or equal to {spleef.minplayers}:
                                send "Yeah" to console
                                if {countdown.%arg-2%} is "no":
                                    send "Mhm" to console
                                    loop all players in world "Spleef":
                                        send "Yepppp" to console
                                        if {arena.%loop-player%} is arg-2:
                                            send "idk" to console
                                            set {countdown.%arg-2%} to "yes"
                                            send "{@p} &3Game is starting in 60 seconds." to loop-player
                                            wait 30 seconds
                                            send "{@p} &3Game is starting in 30 seconds." to loop-player
                                            wait 15 seconds
                                            send "{@p} &3Game is starting in 15 seconds." to loop-player
                                            wait 5 seconds
                                            send "{@p} &3Game is starting in 10 seconds." to loop-player
                                            wait 5 seconds
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 5" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 4" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 3" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 2" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 1" to loop-player
                                            if {spawns.%arg-2%} < {players.%arg-2%}:
                                                broadcast "{@e} &7Warning! Arena %arg-2% in spleef doesn't have enough spawn points set! Contacting all admins..."
                                                loop all players:
                                                    if loop-player is op:
                                                        send "{@e} &7Severe Warning! Arena %arg-2% in spleef doesn't have enough spawn points set meaning it cannot be played. Fix it ASAP!" to loop-player
                                                        loop 7 times:
                                                            play raw sound "mob.wolf.howl" at location of loop-player with pitch 2 volume 1
                                                            wait 10 ticks
                                            else:
                                                wait 1 second
                                                set {_num} to 0
                                                set {playersleft.%arg-2%} to 0
                                                loop all players in world "Spleef":
                                                    if {arena.%loop-player%} is "%arg-2%":
                                                        play raw sound "random.levelup" at location of loop-player with pitch 1 volume 1
                                                        teleport loop-player to {spawn.%arg-2%.%{_num}%}
                                                        add 1 to {_num}
                                                        add 1 to {playersleft.%arg-2%}
                                                        give iron shovel of efficiency 1 to loop-player
The less than works but when starting the countdown it can't think if its greater than or equal to the number of minimum players.
Code:
send "%{players.%arg-2%}% %{spleef.minplayers}%" to console # works
                            if {players.%arg-2%} is greater than or equal to {spleef.minplayers}: # Doesn't do it
                                send "Yeah" to console # Doesn't send it to console that's how I know it doesn't detect it is greater than or equal to {spleef.minplayers}
                                if {countdown.%arg-2%} is "no":
                                    send "Mhm" to console
                                    loop all players in world "Spleef":
                                        send "Yepppp" to console
                                        if {arena.%loop-player%} is arg-2:
                                            send "idk" to console
                                            set {countdown.%arg-2%} to "yes"
                                            send "{@p} &3Game is starting in 60 seconds." to loop-player
Players are 3 and minimum is 1 and it STILL doesn't detect that it's even greater than the minimum players!
A freaking 4 year old will be able to figure that out! (not trying to insult 4-year-olds)

It's really retarded that a coding plugin can't do that.
So is there an alternative to fixing this and figuring it out. (doesn't matter about size I just want it to work....)
 
How are you meant to code when the coding program (in this case plugin) doesn't even work.
Code:
if {countdown.%arg-2%} is not set:
                                set {countdown.%arg-2%} to "no"
                            loop all players in world "Spleef":
                                if {arena.%loop-player%} is "%arg-2%":
                                    send "{@p} &6%player% &3has joined the arena. &7&o(%{players.%arg-2%}%/%{spleef.maxplayers}%)" to loop-player
                            send "%{players.%arg-2%}% %{spleef.minplayers}%" to console
                            if {players.%arg-2%} is greater than or equal to {spleef.minplayers}:
                                send "Yeah" to console
                                if {countdown.%arg-2%} is "no":
                                    send "Mhm" to console
                                    loop all players in world "Spleef":
                                        send "Yepppp" to console
                                        if {arena.%loop-player%} is arg-2:
                                            send "idk" to console
                                            set {countdown.%arg-2%} to "yes"
                                            send "{@p} &3Game is starting in 60 seconds." to loop-player
                                            wait 30 seconds
                                            send "{@p} &3Game is starting in 30 seconds." to loop-player
                                            wait 15 seconds
                                            send "{@p} &3Game is starting in 15 seconds." to loop-player
                                            wait 5 seconds
                                            send "{@p} &3Game is starting in 10 seconds." to loop-player
                                            wait 5 seconds
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 5" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 4" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 3" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 2" to loop-player
                                            wait 1 second
                                            play raw sound "note.pling" at location of loop-player with pitch 1 volume 1
                                            send "{@p} &3Game is starting in 1" to loop-player
                                            if {spawns.%arg-2%} < {players.%arg-2%}:
                                                broadcast "{@e} &7Warning! Arena %arg-2% in spleef doesn't have enough spawn points set! Contacting all admins..."
                                                loop all players:
                                                    if loop-player is op:
                                                        send "{@e} &7Severe Warning! Arena %arg-2% in spleef doesn't have enough spawn points set meaning it cannot be played. Fix it ASAP!" to loop-player
                                                        loop 7 times:
                                                            play raw sound "mob.wolf.howl" at location of loop-player with pitch 2 volume 1
                                                            wait 10 ticks
                                            else:
                                                wait 1 second
                                                set {_num} to 0
                                                set {playersleft.%arg-2%} to 0
                                                loop all players in world "Spleef":
                                                    if {arena.%loop-player%} is "%arg-2%":
                                                        play raw sound "random.levelup" at location of loop-player with pitch 1 volume 1
                                                        teleport loop-player to {spawn.%arg-2%.%{_num}%}
                                                        add 1 to {_num}
                                                        add 1 to {playersleft.%arg-2%}
                                                        give iron shovel of efficiency 1 to loop-player
The less than works but when starting the countdown it can't think if its greater than or equal to the number of minimum players.
Code:
send "%{players.%arg-2%}% %{spleef.minplayers}%" to console # works
                            if {players.%arg-2%} is greater than or equal to {spleef.minplayers}: # Doesn't do it
                                send "Yeah" to console # Doesn't send it to console that's how I know it doesn't detect it is greater than or equal to {spleef.minplayers}
                                if {countdown.%arg-2%} is "no":
                                    send "Mhm" to console
                                    loop all players in world "Spleef":
                                        send "Yepppp" to console
                                        if {arena.%loop-player%} is arg-2:
                                            send "idk" to console
                                            set {countdown.%arg-2%} to "yes"
                                            send "{@p} &3Game is starting in 60 seconds." to loop-player
Players are 3 and minimum is 1 and it STILL doesn't detect that it's even greater than the minimum players!
A freaking 4 year old will be able to figure that out! (not trying to insult 4-year-olds)

It's really retarded that a coding plugin can't do that.
So is there an alternative to fixing this and figuring it out. (doesn't matter about size I just want it to work....)
I think the problem is that one if the 2 variables you're comparing in not a integer. So it can't compare a text with a number. You can add:
code_language.skript:
Set {players.%arg-2%} to {players.%arg-2%} parsed as integer
Set {spleef.minplayers} to {spleef.minplayers} parsed as integer
Before you're checking if they are equal...
 
Status
Not open for further replies.