- Joined
- Sep 24, 2007
- Messages
- 300
JassCraft reports syntax error on line 499 (return 10). What's wrong?
Code:
function cn takes string u returns integer
local string Cn=" !\"#$"+Bn()+"&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
local string c
local integer i=0
if(u=="\b")then
return 8
elseif u=="\t" then
return 9
elseif u=="
" then
return 10
elseif u=="\f" then
return 12
elseif u=="
" then
return 13
endif
loop
set c=SubString(Cn,i,i+1)
exitwhen c==""
if c==u then
return i+32
endif
set i=i+1
endloop
return 0
endfunction