Skript how to use else in 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 comminuty!

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

Omer Shalev

Member
Dec 1, 2022
1
0
1
20
on right click on diamond ore:
if {Cooldown::GoldOre::%uuid of player%} is true:
cancel event
else:
if player is sneaking:
if player's balance >= 10000:
remove 10000 from player's balance
send "&5Voidz&fGenz &7>>> &aUpgraded Your Generator!"
set event-block to emerald ore
remove event-block's location from {diamond.generator::1::*}
remove uuid of player from {diamond.generator::1::%uuid of player%::*}
add event-block's location to {emerald.generator::1::*}
add uuid of player to {emerald.generator::1::%uuid of player%::*}
send action bar "&bYou have upgraded to EmeraldGen!" to player
set {Cooldown::GoldOre::%uuid of player%} to true

it tells me that the else has to be placed after another if how to fix that?
 
on right click on diamond ore:
if {Cooldown::GoldOre::%uuid of player%} is true:
cancel event
else:
if player is sneaking:
if player's balance >= 10000:
remove 10000 from player's balance
send "&5Voidz&fGenz &7>>> &aUpgraded Your Generator!"
set event-block to emerald ore
remove event-block's location from {diamond.generator::1::*}
remove uuid of player from {diamond.generator::1::%uuid of player%::*}
add event-block's location to {emerald.generator::1::*}
add uuid of player to {emerald.generator::1::%uuid of player%::*}
send action bar "&bYou have upgraded to EmeraldGen!" to player
set {Cooldown::GoldOre::%uuid of player%} to true

it tells me that the else has to be placed after another if how to fix that?

Wrong section, post your thread here to get help