Solved variable contains 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.

loadka95

Active Member
Feb 24, 2017
78
6
8
26
Is the contains thing not works with normal variables? only with list variables?
I don't get any error, but its still not working

code_language.skript:
{this.%player%} -> it has some random text in it [bar, fa, saa!]  
if {this.%player%} contains "bar":   #this is not working for me
    message "xyz"

Is there any other way to check if the variable contains the text?
 
According to the docs: "Checks whether an inventory contains the given item, a text contains another piece of text, or a list of objects (e.g. a {list variable::*}) contains another object."

Try using if "%{this.%player%}%" contains "bar" instead.
 
Status
Not open for further replies.