Solved Compare variable not working

  • 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 community!

    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.

MCLaraTeam

Active Member
Oct 5, 2021
72
0
6
I'm trying to compare a variable, but I can't make the process enter to the if, I don't know why.
Code:
        broadcast "Player on arena: %{ArenaNumberOfPlayers.%{_a}%}%"
        broadcast "MinPlayers: %{ArenaMinPlayers.%{_a}%}%"
        if {ArenaNumberOfPlayers.%{_a}%} is greater than or equal to {ArenaMinPlayers.%{_a}%}:
            # set {ArenaWaitingLobbyCountdownTimeActive.%{_a}%} to true
            broadcast "Enter 1"
Note: I try with all and don't work
if {ArenaNumberOfPlayers.%{_a}%} = {ArenaMinPlayers.%{_a}%}:
if {ArenaNumberOfPlayers.%{_a}%} >= {ArenaMinPlayers.%{_a}%}:
if {ArenaNumberOfPlayers.%{_a}%} != {ArenaMinPlayers.%{_a}%}:
if {ArenaNumberOfPlayers.%{_a}%} is {ArenaMinPlayers.%{_a}%}:
unknown.png


Code:
        broadcast "Player on arena: %{ArenaNumberOfPlayers.%{_a}%}%"
        broadcast "MinPlayers: %{ArenaMinPlayers.%{_a}%}%"
        if {ArenaNumberOfPlayers.%{_a}%} is less than {ArenaMinPlayers.%{_a}%}:
            # set {ArenaWaitingLobbyCountdownTimeActive.%{_a}%} to true
            broadcast "Enter 1"
        else:
            broadcast "Enter 2"
Result:
[IMG]https://cdn.discordapp.com/attachments/138027100593455104/897816488055021608/unknown.png[/IMG]
 
Status
Not open for further replies.