Need help with else sections

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

Frostyboy

Member
Aug 26, 2022
1
0
1
19
command /stonepickaxe1:
trigger:
if player's held item is air:
send "&cNo" to player
else:
execute console command "clear %player% wooden_pickaxe"

It says else needs to be placed underneath the if section. I am not sure what this means now.
 
like so line 1: 0 space
line 2: 1 space
line: 3: 2 space
line 4: 3 space
line 5: 2 space
line 6: 3 space

try that
 
You have to tab in sections:
Code:
command /stonepickaxe1:
    trigger:
        if player's held item is air:
            send "&cNo" to player
        else:
            execute console command "clear %player% wooden_pickaxe"

Everything with ":" at the end, the next line needs to go in by 4 spaces.
If you want to reference back to the "if" statement, (Say if you wanted to do an "else") You need to be on the same amount of tabs / spaces as the if statement.
 
Status
Not open for further replies.