Pancake123 Posted November 15, 2022 Share Posted November 15, 2022 I have two things im working on and both have the same issue "Skript cant compare "thing" to "thing". I don't understand why this happens. I use almost the same code for other things and it works but for these it doesn't. There's isn't enough info on google so please help. How do I solve this The code if you want it: on consume of honey bottle: name of item-event is "&o&aGlue Bottle": effect player with nausea The other code: on damage: attacker is a zombie named "&4Damaging Zombie": damage victim by 4 Link to comment Share on other sites More sharing options...
Checkmate128 Posted November 16, 2022 Share Posted November 16, 2022 I'm pretty sure it is supposed to be "event-item" and not "item-event" Owner of oldgaffle.minehut.gg. (my paintball server) Owner of karted.minehut.gg. (my mario kart server) Advocate of individual freedom, especially freedom of speech. Cooler than Stalemate128. Link to comment Share on other sites More sharing options...
Pancake123 Posted November 16, 2022 Author Share Posted November 16, 2022 (edited) 19 hours ago, Checkmate128 said: I'm pretty sure it is supposed to be "event-item" and not "item-event" Nvm it doesn't give any errors anymore but it doesn't work, the rest of the code works if I remove the if thing but now it works for all honey bottle. Edited November 16, 2022 by Pancake123 I did things and realized it didn't work but I already replied. Link to comment Share on other sites More sharing options...
Pancake123 Posted November 16, 2022 Author Share Posted November 16, 2022 @Checkmate128 Link to comment Share on other sites More sharing options...
Checkmate128 Posted November 16, 2022 Share Posted November 16, 2022 1 hour ago, Pancake123 said: @Checkmate128 Yes? What do you need/want? Owner of oldgaffle.minehut.gg. (my paintball server) Owner of karted.minehut.gg. (my mario kart server) Advocate of individual freedom, especially freedom of speech. Cooler than Stalemate128. Link to comment Share on other sites More sharing options...
Pancake123 Posted November 17, 2022 Author Share Posted November 17, 2022 1 hour ago, Checkmate128 said: Yes? What do you need/want? @Checkmate128Do you know anything about the other issue? Changing it to event-item didnt fix it but removed the errors. The rest of the code works if I remove the if thing but then it happens for all honey bottles. Link to comment Share on other sites More sharing options...
Checkmate128 Posted November 18, 2022 Share Posted November 18, 2022 On 11/16/2022 at 7:54 PM, Pancake123 said: @Checkmate128Do you know anything about the other issue? Changing it to event-item didnt fix it but removed the errors. The rest of the code works if I remove the if thing but then it happens for all honey bottles. Option 1: on consume of honey bottle: name of event-item is "&o&aGlue Bottle" effect player with nausea Option 2: on consume of honey bottle: if name of event-item is "&o&aGlue Bottle": effect player with nausea Either one should work. Owner of oldgaffle.minehut.gg. (my paintball server) Owner of karted.minehut.gg. (my mario kart server) Advocate of individual freedom, especially freedom of speech. Cooler than Stalemate128. Link to comment Share on other sites More sharing options...
Pancake123 Posted November 18, 2022 Author Share Posted November 18, 2022 @Checkmate128It doesn't work. It gives no errors but drinking a honey bottle named glue bottle does not give you nausea. Link to comment Share on other sites More sharing options...
Checkmate128 Posted November 19, 2022 Share Posted November 19, 2022 4 hours ago, Pancake123 said: @Checkmate128It doesn't work. It gives no errors but drinking a honey bottle named glue bottle does not give you nausea. I want to do debugging and see which section is not working. Use this code: on consume of honey bottle: broadcast "item type check passed" if name of event-item is "&o&aGlue Bottle": broadcast "item name check passed" effect player with nausea Let me know what is outputted into chat when you apply my provided skript and drink the appropriately named honey bottle. Owner of oldgaffle.minehut.gg. (my paintball server) Owner of karted.minehut.gg. (my mario kart server) Advocate of individual freedom, especially freedom of speech. Cooler than Stalemate128. Link to comment Share on other sites More sharing options...
Pancake123 Posted November 20, 2022 Author Share Posted November 20, 2022 On 11/18/2022 at 9:18 PM, Checkmate128 said: I want to do debugging and see which section is not working. Use this code: on consume of honey bottle: broadcast "item type check passed" if name of event-item is "&o&aGlue Bottle": broadcast "item name check passed" effect player with nausea Let me know what is outputted into chat when you apply my provided skript and drink the appropriately named honey bottle. It gave me item type check passed. It did not do the other thing Link to comment Share on other sites More sharing options...
Dannydino6 Posted November 20, 2022 Share Posted November 20, 2022 I personally would never use is i would use contains In this case I would use: if name of event-item contains "&aGlue": Skript Developer Owner of the Skript Club Minecraft player since 2009 Minehut member since 2016 Morememes#3426 Link to comment Share on other sites More sharing options...
Pancake123 Posted November 21, 2022 Author Share Posted November 21, 2022 1 hour ago, Dannydino6 said: I personally would never use is i would use contains In this case I would use: if name of event-item contains "&aGlue": That still doesnt work. Link to comment Share on other sites More sharing options...
Dannydino6 Posted November 21, 2022 Share Posted November 21, 2022 the first debug works? Skript Developer Owner of the Skript Club Minecraft player since 2009 Minehut member since 2016 Morememes#3426 Link to comment Share on other sites More sharing options...
Dannydino6 Posted November 21, 2022 Share Posted November 21, 2022 maybe try if name of event-itemtype contains "&aGlue": Skript Developer Owner of the Skript Club Minecraft player since 2009 Minehut member since 2016 Morememes#3426 Link to comment Share on other sites More sharing options...
Pancake123 Posted November 21, 2022 Author Share Posted November 21, 2022 (edited) 20 hours ago, Dannydino6 said: maybe try if name of event-itemtype contains "&aGlue": I haven't fully tested that but that most likely works but probably not for the reason you think. I did some testing and for some reason the &o&a made it not work. I didn't think that was an issue because it changes nothing and it works for other code. For some reason for on consume it doesn't. I did get it to work however so that nice. Edited November 21, 2022 by Pancake123 Forgot to mention I solved the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now