🏆 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!
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/
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.