Hello again,
im still trying to make handles work in ROC and here's the next issue.
I copied the handle script into blizzard.j, thx to low-life for that suggestion.
The awesome thing is that WE actually accepts my scripts with handle functions in it
now, it doenst crash or give erros! wooohhaaaa!!!
But...the script doenst execute. It is meant to display a message to me when i kill a unit but that just doesnt happen. The script looks good to me, no syntax errors.
Does anyone have a clue why this is the case?
thanks,
frenksel
im still trying to make handles work in ROC and here's the next issue.
I copied the handle script into blizzard.j, thx to low-life for that suggestion.
The awesome thing is that WE actually accepts my scripts with handle functions in it
now, it doenst crash or give erros! wooohhaaaa!!!
But...the script doenst execute. It is meant to display a message to me when i kill a unit but that just doesnt happen. The script looks good to me, no syntax errors.
JASS:
function text takes nothing returns nothing
local string A = "omg u killed"
local timer t = CreateTimer()
local unit killer = GetHandleUnit(t,"testing")
local unit d = GetHandleUnit(t,"tester")
local string B = GetUnitName(d)
call DisplayTimedTextToPlayer(GetOwningPlayer(killer),0,0,500,"A+B")
set killer = null
set d = null
set A = null
set B = null
call DestroyTimer(t)
endfunction
function Trig_handletesting_Actions takes nothing returns nothing
local unit killer = GetKillingUnit()
local unit dieer = GetTriggerUnit()
local timer t = CreateTimer()
call SetHandleHandle(t,"testing",killer)
call SetHandleHandle(t,"tester",dieer)
call TimerStart(t,10,false,function text)
set killer = null
set dieer = null
call DestroyTimer(t)
call FlushHandleLocals(t)
endfunction
//===========================================================================
function InitTrig_handletesting takes nothing returns nothing
set gg_trg_handletesting = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_handletesting, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_handletesting, function Trig_handletesting_Actions )
endfunction
Does anyone have a clue why this is the case?
thanks,
frenksel