Cal1991
New Member
- Reaction score
- 7
Ok, I am horrible with jass, so bear with my GUI-coverted triggers.
--
As far as I know, this trigger never used to cuase any errors, but with the latest verson of the map it cuases a fatal error nearly every time.
All that has been added in the more recent version are a bunch of computer AI related triggers, and I can't see how any of them could possibly conflict with this trigger.
Anyway, here is the trigger, anyone see something in it that could cuase a fatal error?
--
As far as I know, this trigger never used to cuase any errors, but with the latest verson of the map it cuases a fatal error nearly every time.
All that has been added in the more recent version are a bunch of computer AI related triggers, and I can't see how any of them could possibly conflict with this trigger.
Anyway, here is the trigger, anyone see something in it that could cuase a fatal error?
Code:
function Trig_Retire_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'ANtm' ) ) then
return false
endif
return true
endfunction
function Trig_Retire_Actions takes nothing returns nothing
local unit a
local player p
set p = GetOwningPlayer(GetSpellTargetUnit())
set a = GetSpellTargetUnit()
call UnitRemoveAbilityBJ( 'AInv', a )
call UnitRemoveAbilityBJ( 'A00K', a )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if p == udg_Player[GetForLoopIndexA()] then
set udg_Numb[1] = GetUnitUserData(a)
call AdjustPlayerStateBJ( udg_Numb[1], udg_Player[GetForLoopIndexA()], PLAYER_STATE_RESOURCE_GOLD )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call PolledWait( 3.00 )
call RemoveUnit( a )
call PolledWait( 1.00 )
set p = null
set a = null
endfunction