D
Deleted member 6377
Using newest version of Skript on MC 1.8.9.
No add-ons. Would like to keep it this way.
This is a very simple, broad version of my command:
The problem is after I add the rank to {listvariable::*}, when I try to remove it, it says “examplerank1 is not a rank!”. When I use the list command, it clearly shows that it is a command. Also, after I used the remove command, when I add a rank which I already added before, it no longer stops me from doing so. I am pretty positive that the “contains” is the culprit to this problem. The “contains” seems to only be working for the addrank command. After entering the removecommand, it stops working.
If this problem is confusing to understand, I will put a YouTube link here tomorrow.
No add-ons. Would like to keep it this way.
This is a very simple, broad version of my command:
code_language.skript:
else if arg 1 is “addrank”:
if {listvariable::*} contains “%arg-2%”
message “already rank”
else:
add arg 2 to {listvariable::*}
message “%arg-2% added”
else if arg 1 is “removerank”:
if {listvariable::*} contains “%arg-2%”:
remove arg 2 from {listvariable::*}
message “%arg-2% removed”
else:
message “%arg-2% is not a rank!”
else if arg 1 is “clearranks”:
clear {listvariable::*}
message “cleared”
else if arg 1 is “listranks”:
If size of {listvariable::*} < 1:
message “no ranks!”
else:
message “%{listvariable::*}%”
The problem is after I add the rank to {listvariable::*}, when I try to remove it, it says “examplerank1 is not a rank!”. When I use the list command, it clearly shows that it is a command. Also, after I used the remove command, when I add a rank which I already added before, it no longer stops me from doing so. I am pretty positive that the “contains” is the culprit to this problem. The “contains” seems to only be working for the addrank command. After entering the removecommand, it stops working.
If this problem is confusing to understand, I will put a YouTube link here tomorrow.