- Joined
- Aug 7, 2004
- Messages
- 875
Hey guys I seem to encounter another problem and is returning local trigger fields. Well truth is it should work fine but there are many implications such as limmited amount of local trigger running in virtual memory and stuff. I'm not sure about all the implications so I ask you guys, master of JASS, whether it is better to do option A or option B.
Option A:
Option B:
Both function gets called in my InitVars function which is called in the main function in the .j file.
So whats ur opinion?
Option A:
JASS:
function InitTrigger takes nothing returns trigger
local trigger t = CreateTrigger( )
call TriggerRegisterEvent(t, ...)
call TriggerAddAction(t, ...)
return t
endfunction
Option B:
JASS:
globals
trigger gg_trg_test
endglobals
function InitTrigger takes nothing returns nothing
set gg_trg_test = CreateTrigger( )
call TriggerRegisterEvent(gg_trg_test , ...)
call TriggerAddACtion(gg_trg_test , ...)
endfunction
Both function gets called in my InitVars function which is called in the main function in the .j file.
So whats ur opinion?