String in if() statements
#9

What the hell is the problem with you? If your property does not have an owner, make the string "*" by simply assigning the value (no format, no strcat, no whatsoever, just simply = to assign).
To check if the property is unowned, do if(hInfo[h][hOwner][0] == '*'). Simple and quick, voila.

And there's really nothing to justify using strfind instead of strcmp if you've designed the system yourself and are aware of the array contents
Reply


Messages In This Thread
String in if() statements - by Riddy - 21.12.2012, 16:43
Re: String in if() statements - by Lapon - 21.12.2012, 16:47
Re: String in if() statements - by Lordzy - 21.12.2012, 16:52
Re: String in if() statements - by Riddy - 21.12.2012, 17:03
Re: String in if() statements - by ikey07 - 21.12.2012, 17:23
Re: String in if() statements - by Riddy - 21.12.2012, 18:21
Re: String in if() statements - by wups - 21.12.2012, 18:25
Re: String in if() statements - by Riddy - 21.12.2012, 19:26
Re: String in if() statements - by AndreT - 21.12.2012, 19:31
Re: String in if() statements - by Riddy - 21.12.2012, 19:45

Forum Jump:


Users browsing this thread: 1 Guest(s)