This don't work these are my codes :
//TESH.scrollpos=1
//TESH.alwaysfold=0
function Trig_Melee_Initialization_Actions takes nothing returns nothing
local unit u = CreateUnit(Player(0), 'Hpal', -3264, 3008, 0)
local integer i = 1
local integer ii = 1
local integer max = 52
local integer max2 = 104
loop
loop
if IsTerrainPathable(GetUnitX(u),GetUnitY(u), PATHING_TYPE_FLOATABILITY) != true then
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl", GetUnitX(u), GetUnitY(u)))
endif
call SetUnitX(u, GetUnitX(u) + 128)
exitwhen ii > max
set ii = ii + 1
endloop
call SetUnitX(u, -3264)
call SetUnitY(u, GetUnitY(u) - 128)
set ii = 1
exitwhen i > max2
set i = i + 1
endloop
call RemoveUnit(u)
endfunction
//===========================================================================
function InitTrig_Melee_Initialization takes nothing returns nothing
set gg_trg_Melee_Initialization = CreateTrigger( )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_Melee_Initialization, Player(0) )
call TriggerAddAction( gg_trg_Melee_Initialization, function Trig_Melee_Initialization_Actions )
endfunction