cougarxr7 1 Posted July 14, 2010 (edited) This works fine if your players' name is x,y, or z. _array = ["x","y","z"]; if ((name player) in _array) then { hint "you are in the array"; }; But what is the opposite of this?? I've tried several conditions only to get errors. Such as, here are a couple. if (not(name player) in _array) then {<errors or if (((name player)not) in _array) then {<errors Thanks for the help. Edited July 14, 2010 by Cougarxr7 Share this post Link to post Share on other sites
ProfTournesol 956 Posted July 14, 2010 if (!(name player in _array)) then... Share this post Link to post Share on other sites
cougarxr7 1 Posted July 14, 2010 Thanks! That worked! This syntax is some wierd stuff!! this , if (not(name player) in _array) then {<errors is not the same as this, if (!(name player in _array)) then {<works! Learned something new again! Again thanks! Share this post Link to post Share on other sites
ProfTournesol 956 Posted July 14, 2010 Well, "!" and "not" are equivalent. The opposite of "true" is "false", so the opposite of if (condition) is if not(condition) So your not(name player) in _array has a trouble of bracket, which should be placed like this : not[color="red"]([/color](name player) in _array[color="Red"])[/color] Cheers ! Share this post Link to post Share on other sites
cougarxr7 1 Posted July 14, 2010 (edited) I do not know why but I thought that, not or ! had to be enclosed in parentheses with the condition. But now I know it does not. if (!( (name player) in _array) ) then { I just tested the line above and it worked too! Thanks! Like I said earlier, learning new things everyday! Edited July 14, 2010 by Cougarxr7 Share this post Link to post Share on other sites