• 🏆 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] This makes the loop stuck.

Status
Not open for further replies.
Level 23
Joined
Apr 16, 2012
Messages
4,041
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)
 
Status
Not open for further replies.
Top