Can't Compare 'spawner's set name' with a text

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

ArthurMorgan

New Member
Dec 1, 2020
6
0
1
25
Hello, I am trying to make a script where if a player broke a spawner, it drops with the spawn egg of the mob inside it, but I get the error:

Can't compare 'spawner's set name' with a text (spawner.sk, line 11: if spawner's set name is "blaze":')

My code:
on right click:
if clicked block is spawner:
if player's held item is blaze spawn egg:
set name of spawner to "blaze"


on break of spawner:
if spawner's set name is "blaze":
drop 1 blaze spawn egg and 1 spawner
 
it wont work like that, since the spawner does not have a gui It wont set a name if its placed down because it has no where to save it
:emoji_slight_smile:)
 
you can add a custom nbt to that block but it would be deleted once you restart the server
 
Status
Not open for further replies.