Page 1 of 1

killtrigger and resetprofile alias not working

Posted: Tue Jul 16, 2013 8:15 pm
by TheUltimateMap
After much reading and trying different solutions, including here in the forum, I need help with a temp trigger that runs and fires properly but I can't seem to kill; I still see it in the statistics. In trying different things, I used resetprofile() as a temporary solution, which worked for a bit, but since also has stopped working. Here is the setup:

Alias 1:
Code: [show] | [select all] lua
triggerID = tempComplexRegexTrigger("triggername", "pattern detected", [[echo("it fired")]], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Alias 2:
Code: [show] | [select all] lua
killtrigger("triggername")
Alias 3:
Code: [show] | [select all] lua
resetprofile()
Note also that I pressed the enter key a few times after running the trigger to generate some lines from the MUD and fired it before trying to kill it.

It's probably something ridiculously simple I overlooked. Any suggestions?

Re: killtrigger and resetprofile alias not working

Posted: Tue Jul 16, 2013 11:32 pm
by Omni
killTrigger not killtrigger and resetProfile not resetprofile, check the error console(exclamation point button in the script dialog window) more often and it will usually tell you what you did wrong.

Re: killtrigger and resetprofile alias not working

Posted: Wed Jul 17, 2013 1:01 am
by TheUltimateMap
Oh snap, should have realized it was case sensitive by all the capitalized letters in the API :? And thanks for pointing out the error console.

resetProfile now works but killTrigger still does not. I noticed something else however that may indicate the problem, and it could be the trigger itself. I set it to highlight the pattern a few different colors but they did not take effect. I tried it with and without triggerID, not sure if that was ever right to begin with.

So now it's
Code: [show] | [select all] lua
tempComplexRegexTrigger("triggername", "pattern detected", [[echo("it fired")]], 0, 0, 0, 0, 0, 13, 4, 0, 0, 0)
And
Code: [show] | [select all] lua
killTrigger("triggername")
Any idea what could be happening?

Re: killtrigger and resetprofile alias not working

Posted: Wed Jul 17, 2013 8:48 am
by Vadi
killTrigger needs a trigger ID - not a name. So it doesn't work for the tempComplexRegexTrigger. Check out this example on how to accomplish this though: http://wiki.mudlet.org/w/Manual:Scripti ... _target.3F