23.07.2014, 15:57
Quote:
The brackets are there to stop the warning, because you are right that you don't normally have an assignment in loops, but in this case you do. As for why it stops, strings are "NULL" terminated. That means that after all the characters you see there is a special character, which is empty. The loop keeps going while the current character is not empty.
Anyway, if you want to use YSI, and not custom functions (frankly a silly position but there we go), there is an "isnumeric" function in there already (a better one than both posted here btw): pawn Код:
|
So does the loop use the assignment statement like it would use "i < MAX_PLAYERS" and when it hits "NULL", it stops? I'm just confused as to how the assignment also acts as a comparison.
Quote:
Once you run into something that's not numeric loop stops. 123A34342 as string function will loop until it finds that A and then return 0 comes into the place.
|
I didn't ask what it did. Your reply clearly shows how well you read.