HOW TO CHECK FOR FLOATING POINT:
no need for fancy modf stuff or other bruteforce checking :P
this will work always (for number that fit in the precision&size allowed by the game).
:)
(V-Man nice work on the toolbox thing)
no need for fancy modf stuff or other bruteforce checking :P
this will work always (for number that fit in the precision&size allowed by the game).
[SELECT ALL] Code:
alias "isfloat" [if (strcmp (+f $arg1 0) $arg1) [result 1] [result 0]]
alias "isint" [if (strcmp (+ $arg1 0) $arg1) [result 1] [result 0]]
alias "isnumber" [if (|| (isfloat $arg1) (isint $arg1)) [result 1] [result 0]]
:)
(V-Man nice work on the toolbox thing)