[Solved] Strange bug. Functions turns into "(0)"

Status
Not open for further replies.
I have this script (It isn't optimized yet):

JASS:
function isNight takes nothing returns boolean
    if GetFloatGameState(GAME_STATE_TIME_OF_DAY) <= 6.00 and GetFloatGameState(GAME_STATE_TIME_OF_DAY) >= 18.00 then
        return true
    endif
    
    return false
endfunction

function Trig_Unkillable_Actions takes nothing returns nothing
    local unit target = udg_DamageEventTarget
    
    if GetUnitTypeId(udg_DamageEventTarget) == 'n000' and GetUnitState(target, UNIT_STATE_LIFE) <= udg_DamageEventAmount and isNight == true then
    set udg_DamageEventAmount = 0.00
    call SetUnitLifePercentBJ( target, 100 )
    call SetUnitInvulnerable( target, true )
    call PauseUnit( target, true )
    call SetUnitAnimation(target, "death" )
    endif
endfunction

//===========================================================================
function InitTrig_Unkillable takes nothing returns nothing
    set gg_trg_Unkillable = CreateTrigger(  )
    call TriggerRegisterVariableEvent( gg_trg_Unkillable, "udg_DamageModifierEvent", EQUAL, 1.00 )
    call TriggerAddAction( gg_trg_Unkillable, function Trig_Unkillable_Actions )
endfunction

And for some reason i get this bug:
attachment.php


I have JassHelper 0.9.1.2 and jassnewgenpack5d
 

Attachments

  • Bug.png
    Bug.png
    16.6 KB · Views: 214
Last edited by a moderator:
Status
Not open for further replies.
Back
Top