Issue with input

  • 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 community!

    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.

PatoFrango

Active Member
Jul 12, 2017
240
14
18
Hi,

I'm trying to remove all blue dyes from a player's inventory where their name either contains "Fire", "Water", or "Snow". I get no compiling errors, it just doesn't work on runtime.

Code:
code_language.skript:
remove all blue dyes where [name of input contains "Fire", "Water" or "Snow"] from {player1fire}
 
{player1fire} should be a list or an inventory.
Try this:
code_language.skript:
remove all blue dyes where [name of input contains "Fire", "Water" or "Snow"] from {player1fire}'s inventory
 
{player1fire} should be a list or an inventory.
Try this:
code_language.skript:
remove all blue dyes where [name of input contains "Fire", "Water" or "Snow"] from {player1fire}'s inventory
I've tried that before, still doesn't work.
 
Hi,

I'm trying to remove all blue dyes from a player's inventory where their name either contains "Fire", "Water", or "Snow". I get no compiling errors, it just doesn't work on runtime.

Code:
code_language.skript:
remove all blue dyes where [name of input contains "Fire", "Water" or "Snow"] from {player1fire}
I think it's because what the part 'all blue dyes where [name of input contains "Fire", "Water" or "Snow"]' basically does is this: 1. gets all blue dyes. 2. remove the ones where the name doesn't contain "Fire", "Water" or "Snow". And since Skript doesn't know 'all blue dyes' is about the player's inventory, it will assume that its just all blue dyes in Minecraft (but there is only one blue dye). But I could be completely wrong
 
I think it's because what the part 'all blue dyes where [name of input contains "Fire", "Water" or "Snow"]' basically does is this: 1. gets all blue dyes. 2. remove the ones where the name doesn't contain "Fire", "Water" or "Snow". And since Skript doesn't know 'all blue dyes' is about the player's inventory, it will assume that its just all blue dyes in Minecraft (but there is only one blue dye). But I could be completely wrong
To me, that doesn't quite make sense. I've even tried putting "from {player1fire}'s inventory" and still nothing happened. "Getting all blue dyes from Minecraft" doesn't make sense to me as well as I don't think that's how Skript handles things. As far as I know, Skript doesn't have all the minecraft items in a default list of item types where it just accesses it every time no list is specified, so idk...
 
To me, that doesn't quite make sense. I've even tried putting "from {player1fire}'s inventory" and still nothing happened. "Getting all blue dyes from Minecraft" doesn't make sense to me as well as I don't think that's how Skript handles things. As far as I know, Skript doesn't have all the minecraft items in a default list of item types where it just accesses it every time no list is specified, so idk...
That's not what I meant. Try setting a variable to "all blue dyes where [name of input contains "Fire", "Water" or "Snow"]" and messaging it in chat to see if that works. Because that's what I mean. Maybe you will get this: (from the docs) Filters a list based on a condition. The part 'blue dyes' in your code isn't a list so it won't work.
 
Last edited:
Status
Not open for further replies.