Sometimes this trigger works...

Posted by Jeagan on Tue 22 Dec 2009 11:46 AM — 3 posts, 12,252 views.

#0
Alright... So I have the following trigger:

<triggers>
<trigger
enabled="y"
match="Player Name On For Idle Under Construction"
send_to="12"
sequence="800"
>
<send>world.EnableTriggerGroup "WHOISIDLE", 1</send>
</trigger>
</triggers>

And it matches perfectly fine, the issue is that it pops up a scripting error and doesn't compile I guess. I use a very very similar script to this one all the time, and I can't seem to figure out why it works and this one fails, so I really need help bad. I get the following error:

Error number: 0
Event: Compile error
Description: [string "Trigger: "]:1: unexpected symbol near ','
Called by: Immediate execution

I'm not super incredibly savvy at this, so any help would be great. Thanks.
Australia Forum Administrator #1
In Lua arguments have to be in brackets, unless you have a single string argument, which you don't. Change:


world.EnableTriggerGroup "WHOISIDLE", 1


to:


world.EnableTriggerGroup ("WHOISIDLE", 1)

#2
Annnnnd... That fixed it. Thanks Nick!