• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Syntax error

Status
Not open for further replies.
Level 8
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
 
Status
Not open for further replies.
Top