How do I make an if variable is skript?

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

zSenorx

Member
Jul 13, 2024
3
0
1
I'm new to skript and trying to make a basic plugin to learn, I'm trying to make it so that it detects if a variable is a certain value. I've done it like this:

command selectbuff:
if "{%player's uuid%.gotbuff}" is set to "Selected":
stop
else:
my code blah blah blah

But when I reload my skript, I get this error message:
Unexpected entry 'if "{%player's uuid%.gotbuff}" is set to "Selected"'. Check that it's spelled correctly, and ensure that you have put all code into a trigger.

Can someone help?
 
I'm new to skript and trying to make a basic plugin to learn, I'm trying to make it so that it detects if a variable is a certain value. I've done it like this:

command selectbuff:
if "{%player's uuid%.gotbuff}" is set to "Selected":
stop
else:
my code blah blah blah

But when I reload my skript, I get this error message:
Unexpected entry 'if "{%player's uuid%.gotbuff}" is set to "Selected"'. Check that it's spelled correctly, and ensure that you have put all code into a trigger.

Can someone help?
Code:
if {%player's uuid%.gotbuff} is "Selected":


if {%player's uuid%.gotbuff} = "Selected":


{%player's uuid%.gotbuff} is "Selected":


{%player's uuid%.gotbuff} = "Selected":
 
Code:
if {%player's uuid%.gotbuff} is "Selected":


if {%player's uuid%.gotbuff} = "Selected":


{%player's uuid%.gotbuff} is "Selected":


{%player's uuid%.gotbuff} = "Selected":
None of these worked for me. All of them had the same error, Unexpected Entry. Just to test if it was my code, I created a new skript and tried to make this same filter.

Code:
command killms:
    if {%player's uuid%.gotbuff} is "Selected":
        message "hi" to player
    else:
        set {%player's uuid%.gotbuff} to "Selected"
        message "bye" to player

Still had the same issue. If it helps, I'm using Skript 2.8.7 for 1.20.1. I also have skQuery installed into my server.