WarLuvr3393
Hmmm...too many things to play (WoW, COD4, WC3)
- Reaction score
- 54
I'm having a weird problem with this text macro script I'm experimenting with. Here's the code:
Now what's weird is that this error pops up:
What's going on here?
Code:
function brown_check takes nothing returns boolean
return GetOwningPlayer(GetTriggerUnit()) == Player(11)
endfunction
//! textmacro kill_collision takes number, unit
function kill_$number$ takes nothing returns nothing
call KillUnit($unit$)
endfunction
//! endtextmacro
//! runtextmacro kill_collision("a", "gg_unit_h000_0011")
//! runtextmacro kill_collision("b", "gg_unit_h000_0012")
//! runtextmacro kill_collision("c", "gg_unit_h000_0018")
//! runtextmacro kill_collision("d", "gg_unit_h000_0019")
//! runtextmacro kill_collision("e", "gg_unit_h000_0020")
//! runtextmacro kill_collision("f", "gg_unit_h000_0021")
//! runtextmacro kill_collision("g", "gg_unit_h000_0022")
//! runtextmacro kill_collision("h", "gg_unit_h000_0023")
//! runtextmacro kill_collision("i", "gg_unit_h000_0024")
//! runtextmacro kill_collision("j", "gg_unit_h000_0025")
//===========================================================================
function InitTrig_Kill_1 takes nothing returns nothing
//! textmacro set_var takes number
local trigger trig_$number$ = CreateTrigger()
//! endtextmacro
//! runtextmacro set_var("a")
//! runtextmacro set_var("b")
//! runtextmacro set_var("c")
//! runtextmacro set_var("d")
//! runtextmacro set_var("e")
//! runtextmacro set_var("f")
//! runtextmacro set_var("g")
//! runtextmacro set_var("h")
//! runtextmacro set_var("i")
//! runtextmacro set_var("j")
//! textmacro func takes letter, unit
call TriggerRegisterUnitInRangeSimple(trig_$letter$, 30.00, $unit$)
call TriggerAddCondition(trig_$letter$, Condition(function brown_check))
call TriggerAddAction(trig_$letter$, function kill_$letter$)
//! endtextmacro
//! runtextmacro func("a", "gg_unit_h000_0011")
//! runtextmacro func("b", "gg_unit_h000_0012")
//! runtextmacro func("c", "gg_unit_h000_0018")
//! runtextmacro func("d", "gg_unit_h000_0019")
//! runtextmacro func("e", "gg_unit_h000_0020")
//! runtextmacro func("f", "gg_unit_h000_0021")
//! runtextmacro func("g", "gg_unit_h000_0022")
//! runtextmacro func("h", "gg_unit_h000_0023")
//! runtextmacro func("i", "gg_unit_h000_0024")
//! runtextmacro func("j", "gg_unit_h000_0025")
endfunction
Now what's weird is that this error pops up:
What's going on here?