1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved "set name of event-item to [name]"

Discussion in 'Skript' started by CrimZ0N, Aug 16, 2017.

Thread Status:
Not open for further replies.
  1. CrimZ0N

    CrimZ0N Member

    Joined:
    Jan 28, 2017
    Messages:
    56
    Likes Received:
    3
    Skript Version: Bensku's latest fork (dev30d)
    Skript Author:
    Minecraft Version:
    1.12
    ---
    Full Code:

    Code (Skript):
    1.  
    2. on item spawn of sunflower:
    3.     if name of event-item is "&e&lCoin":
    4.         stop
    5.     else:
    6.         add "{Item:{tag:{display:{Name:""&e&lCoin""}}}}" to nbt of entity
    7.  
    Errors on Reload: Can't understand this condition/effect: add "{Item:{tag:{display:{Name:""&e&lCoin""}}}}" to nbt of entity (MarioMode.sk, line 12: add "{Item:{tag:{display:{Name:""&e&lCoin""}}}}" to nbt of entity')

    Other Useful Info: Dunno, I was looking through old scripts because I needed something like this, found this in a couple of other scripts (not just 1 or 2 lines, around 60 lines of it being used) so I assumed it worked but I guess an update or something broke it?

    Addons using (including versions):
    Addons I am using are AdvancementAddon, SkEvents, MundoSk, QuarSk, SharpSk, Skellett, SkMorkaz, SkQuery, SkRayfall, SkStuff, SkUtilities, Tuske, Umbaska, Vixio and WildSkript. They've all been updated to the latest version (latest version available) around 4-5 days ago.

    Troubleshooting:

    Have you tried searching the docs? Yes I have.
    Have you tried searching the forums? Yes.
    What other methods have you tried to fix it? I tried "set name of event-entity" and "set the name of the spawned entity(or item) to "&e&lCoin"" but neither of them worked, sadly.



    So, I need help. How do I set the name of an item during an "on item spawn" event? Did I do it wrong? I assume I did since I didn't quite test the skripts (skripts I was using quite some time ago), I just copied that part since I needed it and pasted it since thats all I neede.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    You need to use
    Code (Skript):
    1. event-entity
    instead of:
    Code (Skript):
    1. event-item
    :emoji_grinning:

    So try using:
    Code (Skript):
    1. on item spawn of sunflower:
    2.     if name of event-item is "&e&lCoin":
    3.         stop
    4.     else:
    5.         set the name of the event-entity to "&e&lCoin"
     
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    231
    Whilst I am not getting any errors, the item is not being renamed, sadly.
    --- Double Post Merged, Aug 16, 2017, Original Post Date: Aug 16, 2017 ---
    Oh, nevermind, fixed it, it was due to the incorrect version (I guess I didn't have all the latest versions for the addons)

    Solution for anyone else (if they encounter the same problem/error)
    Make sure the versions are compatible. I am using paperSpigot 1.12 alongside SkStuff v1.6.4.1 fork 1.12
     
Thread Status:
Not open for further replies.

Share This Page

Loading...