- Joined
- Oct 24, 2012
- Messages
- 6,545
y does S2I always return 0 ?
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
local integer i = 0
set tempinteger = tempinteger + 1
if tempinteger == 1 then
set i = S2I("A1")
call BJDebugMsg(I2S(i))
set i = S2I("A3")
call BJDebugMsg(I2S(i))
set i = S2I("A5")
call BJDebugMsg(I2S(i))
set i = S2I("A7")
call BJDebugMsg(I2S(i))
endif
endfunction
S2I(string)
has to contain a string that is only a number, nothing else: S2I("50")
would return 50.This works:is there any way to convert it to integer ?
call BJDebugMsg( I2S('a') )
. set i = S2I("'00A1'")
call BJDebugMsg(I2S(i))
set i = S2I("'00A3'")
call BJDebugMsg(I2S(i))
set i = S2I("'00A5'")
call BJDebugMsg(I2S(i))
set i = S2I("'00A7'")
call BJDebugMsg(I2S(i))
ik about ASCII values but thx apocalypse although i did not know the actual values i knew about it thx for the link anyways
next question is there any way to change strings to ascii ?
also y does '"A1"' and '"A3"' give same values ?
i was hoping this way would work but no it does is there any way to get something like this to work ? thx
JASS:set i = S2I("'00A1'") call BJDebugMsg(I2S(i)) set i = S2I("'00A3'") call BJDebugMsg(I2S(i)) set i = S2I("'00A5'") call BJDebugMsg(I2S(i)) set i = S2I("'00A7'") call BJDebugMsg(I2S(i))
set i = '00A1'
call BJDebugMsg(I2S(i))