HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger don't execute

08-18-2005, 02:51 PM#1
Zoxc
Quote:
local trigger goback
set goback = CreateTrigger()

call TriggerAddAction(goback, function Questtest)
call TriggerRegisterTimerEventPeriodic( goback, 0.6 )

call BJDebugMsg(I2S(H2I(goback)))

set goback = null

This trigger is not executeing...
But the code is getting executed......

Here is Questtest:
Quote:
function Questtest takes nothing returns nothing

call BJDebugMsg("lol")

endfunction
08-18-2005, 10:36 PM#2
Vexorian
How are you sure the code is executed?

Could it be that the trigger is getting destroyed?

Also, this could be the "return bug" bug.

http://www.wc3jass.com/viewtopic.php?t=2091
08-18-2005, 11:16 PM#3
Zoxc
The code is getting executed cuz I see the message.. Removeing set null does not help, BTW is that JASS forum still active.. and we got to ask draco for syntax highlightnig
08-18-2005, 11:19 PM#4
Vexorian
It is as active as it can.

I would be conformed with just preformatted text.

I am sure that the problem is caused by something else, perhaps you have two locals with the same name?
08-18-2005, 11:27 PM#5
Zoxc
I got a few call DestroyTrigger(GetTriggeringTrigger()), but do that change in a function? Won't it always be that same?
08-18-2005, 11:29 PM#6
Vexorian
GetTriggeringTrigger should always point to the current trigger.

I don't know what would happen if you call it from a timer expire or if you Destroy(GetTriggeringTriggering) after the trigger is destroyed
08-18-2005, 11:36 PM#7
Zoxc
When the trigger is destroy and u try to destroy it, Wc3 shotdown... I don't use any timers...