D
Dawn
Guest
I used real(string) to check if the string value contains convertable-to-number string or just plain string. Now it shows "unable to convert string [value] to number" error... which really messes up my script. Is there a workaround for this?
I specifically used it for this
EDIT: Well, I fixed it with str!="" and string_digits(str) == string_length(str) but I still don't understand why it had to be done.
I specifically used it for this
Code:
///@param str
var str=argument0;
if !is_string(str) return false
if string_upper(string_copy(str,1,3))=="INF" return false
if real(str)==0 {
if str=="0" return true
return false
}
return true
Last edited by a moderator: