Code: Select all
if u=="" or u==null then
return 0
elseif u=="\b" then
return 8
elseif u=="\t" then
return 9
elseif u=="\n" then
return 10
elseif u=="\f" then
return 12
elseif u=="\r" then
return 13
endif
Code: Select all
if u=="" then
return 0
endif
local string u=SubString(char,0,1)
First of all, a string can't be 'null' so we can remove that comparison.
Second of all, the substring u will ALWAYS either be "" or a string length of one (char,0,1) 1-0=1
Therefore, how can a string with a maximum string length of one be equal to "\b" (A string of length two).
Seems to me like you don't really have a problem--it looks like a form of protection if anything.
And believe me, posting in JASS section is your best bet.