Can you find the leak?

newtonrox

Member
Reaction score
2
JASS:
function filter_Copy takes nothing returns nothing
    local integer i = 0
    local unit u = GetFilterUnit()
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    if GetUnitTypeId(u) == 'h001' and GetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED) < 70 then
        loop
        exitwhen i >= 5
            call CreateUnit(GetOwningPlayer(u), 'h00C', x,y, bj_UNIT_FACING)
            set i = i + 1
        endloop
    endif
    set u = null
endfunction

function Actions takes nothing returns nothing
    local group g = CreateGroup()
    call GroupEnumUnitsInRect(g, bj_mapInitialPlayableArea, null)
    call ForGroup(g, function filter_Copy)
    call DestroyGroup(g)
    set g = null
endfunction

//===========================================================================

function InitTrig_Spawn_Basic_Copy takes nothing returns nothing
    set gg_trg_Spawn_Basic_Copy = CreateTrigger()
    call TriggerRegisterTimerEventPeriodic(gg_trg_Spawn_Basic_Copy, 2.0)
    call TriggerAddAction(gg_trg_Spawn_Basic_Copy, function Actions)
endfunction


cuz i can't and this is crashing my game after 2 hours XD
this is a footmen frenzy spawn-like trigger
pls help me
(when i disable this trigger it does not crash )
 

Exide

I am amazingly focused right now!
Reaction score
448
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top