[JASS] This makes the loop stuck.

Status
Not open for further replies.
interesting, I tested it and when I did a normal function call onInit it just print 0.000, if however I try to set a value to the function call(local xx x = func() ), it crashes the thread when I try to print the value
code I used:
JASS:
function getsomenum takes nothing returns real
    return GetRandomInt(0, 359)
endfunction

function InitTrig_trig takes nothing returns nothing
    local real r
    call BJDebugMsg(R2S(getsomenum()))
    call BJDebugMsg(R2S(getsomenum()))
    set r = getsomenum()
    call BJDebugMsg("AA")
    call BJDebugMsg(R2S(r))
endfunction

prints:
0.000
0.000
AA

so maybe you should return the type they expect you to do and evidentally no typecasting will not happen in return type(thx blizz)
 
Blizzard doesn't like us to typecast that easily. (ever since the exploit of I2C)

Just use I2R or R2I as Xonok said. There shouldn't really be a reason to need to typecast in any other way when you already have functions for it. If you need to typecast other things then just use this:
http://www.thehelper.net/threads/typecasting.121176/
 
Status
Not open for further replies.
Back
Top