Jump to content
Sign in to follow this  
lifted86

check if string is empty

Recommended Posts

_string = "";

is there anyway i can check if _string == ""?

Ive tried _string == "" and isNil("_string") cant seem to get these to work.

Share this post


Link to post
Share on other sites
_string = "";

if (isNil _string) then {player sidechat "nil string"};

if (_string=="") then {player sidechat "emptyQuotes string"};

Share this post


Link to post
Share on other sites

_string = "";

This should work. Is _string being checked outside its scope? Try declaring it as a private variable. e.g: private ["_string"]

Share this post


Link to post
Share on other sites

yeah

_string == "";

this worked, i was checking the wrong variable. :p

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×