CaptainJack
New Member
- Reaction score
- 2
I'm not particularly sure if what I am trying to do is legal within JASS, but the compiler and any syntax checker I am using is basically saying there is an error without describing it.
The basic questions is it possible to pass parameters for the Condition and Action portion of a trigger, and if so how is this achieved?
The basic questions is it possible to pass parameters for the Condition and Action portion of a trigger, and if so how is this achieved?
JASS:
function TestFunction1_Conditions takes nothing returns nothing
// Some Condition
endfunction
function TestFunction1_Actions takes string a returns nothing
call BJDebugMsg(a)
endfunction
function TestFunction1 takes string a returns nothing
local trigger test = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(test, EVENT_PLAYER_UNIT_PICKUP_ITEM)
call TriggerAddCondition(test, Condition(function TestFunction1_Conditions))
call TriggerAddAction(test, function TestFunction1_Actions(a))
endfunction
//==========
function CustomTrigger takes nothing returns nothing
call TestFunction1("Testing")
endfunction