#Gen error
1 messages · Page 1 of 1 (latest)
So how do i make so it checks if its able to place or not and it cancel?
if lore of player's held item contains "&bShift + Right-Click to upgrade!":
if {gens::placed::%player's uuid%} >= {gens::max::%player's uuid%}:
cancel event
send "&c&lERROR: &7You don't have enough generator slots." to player
play sound "entity.villager.no" with volume 100 and pitch 2 to player
else:
add 1 to {gens::placed::%player's uuid%}
send "&a&lSUCCESS: &7You have placed your &eWheat Generator" to player
add location of event-block to {gens::drop::%player's uuid%::1::*}
play sound "block.note_block.bell" with volume 100 and pitch 1 to player
set {gen.by.%event-block's location%} to player's uuid ```
Uncancel event
cancel event

Bro my discord is buggin
Oh wait
Where should i add cancel event?
How do i do that?
👍
u mean on place of hay bal?
i just checked and it didnt fix 😦
stop if event is canceled
if lore of player's held item contains "&bShift + Right-Click to upgrade!":
if {gens::placed::%player's uuid%} >= {gens::max::%player's uuid%}:
cancel event
send "&c&lERROR: &7You don't have enough generator slots." to player
play sound "entity.villager.no" with volume 100 and pitch 2 to player
else:
add 1 to {gens::placed::%player's uuid%}
send "&a&lSUCCESS: &7You have placed your &eWheat Generator" to player
add location of event-block to {gens::drop::%player's uuid%::1::*}
play sound "block.note_block.bell" with volume 100 and pitch 1 to player
set {gen.by.%event-block's location%} to player's uuid ```
maybe wait a tick
wait 1 tick
stop if event is canceled
Event Priority can also work I think
wait 1 tick
stop if event is canceled
if lore of player's held item contains "&bShift + Right-Click to upgrade!":
if {gens::placed::%player's uuid%} >= {gens::max::%player's uuid%}:
cancel event
send "&c&lERROR: &7You don't have enough generator slots." to player
play sound "entity.villager.no" with volume 100 and pitch 2 to player
else:
add 1 to {gens::placed::%player's uuid%}
send "&a&lSUCCESS: &7You have placed your &eWheat Generator" to player
add location of event-block to {gens::drop::%player's uuid%::1::*}
play sound "block.note_block.bell" with volume 100 and pitch 1 to player
set {gen.by.%event-block's location%} to player's uuid ```
wait why did that turn into a error?
What is that?
Which idk the syntax for skript so maybe try googling
It's like the order
Which events get fired
right nkw
Your skript code is running before the plots code
oh
alright
stop if event is canceled
if lore of player's held item contains "&bShift + Right-Click to upgrade!":
if {gens::placed::%player's uuid%} >= {gens::max::%player's uuid%}:
cancel event
send "&c&lERROR: &7You don't have enough generator slots." to player
play sound "entity.villager.no" with volume 100 and pitch 2 to player
stop
wait 1 tick
stop if event is canceled
add 1 to {gens::placed::%player's uuid%}
send "&a&lSUCCESS: &7You have placed your &eWheat Generator" to player
add location of event-block to {gens::drop::%player's uuid%::1::*}
play sound "block.note_block.bell" with volume 100 and pitch 1 to player
set {gen.by.%event-block's location%} to player's uuid```
Does this work
lemme see
IT WORKS!!!!!!!!!
Also
another error from before
The wheat is still spawning
From nowhere
it should maybe check if the gen is placed or not
@jaunty rune
Oh just delete the variable associated with them
how do i do that?
yea
so imma make it a command
permission: cmd.resetall
trigger:
loop all players:
delete {gens::drop::%loop-player's uuid%::1::*}
delete {gen.by.%event-block's location%}```
is this looking good?
@jaunty rune
no
%event-block% doesn't exist
what you can do is loop {gens::drop::...*} because it stores all the block locations
i did this and it worked actually
i think only the first "delete" had everything stored