Amended on Thu 16 Dec 2010 11:46 PM (UTC) by Twisol
Message
"%1", not %1. Quotes are important. %1 isn't part of Lua itself: MUSHclient pre-processes the contents of the Send box each time the trigger fires, replacing %1 with the associated data. So if %1 is an energy collector, your code will look like this before Lua can run it:
aethership_module= an energy collector
Lua has no idea what this is supposed to mean. But if you use "%1", it looks like:
aethership_module= "an energy collector"
And then Lua knows that "an energy collector" contains data.
EDIT: Same goes for every other place you're using %1.
<triggers>
<trigger
enabled="y"
group="Test"
keep_evaluating="y"
match="^You step up to (an energy collector|a battle turret)\, locking yourself into the module and linking your mind to the controls of the ship\. After a moment\, you begin to sense your command of the module in your own brain\.$"
name="Link_up"
regexp="y"
send_to="12"
sequence="100"
>
<send>
aethership_module= %1
if aethership_module=="an energy collector" then
if (GetVariable("treant_auto_Siphoning")=="true") then
--If siphoning is already on, it'll let us know.
Execute("AUTO Siphoning ON")
else
Execute("AUTO Siphoning OFF")
end
elseif %1=="a battle turret" then
EnableTriggerGroup("Aethership Gunning",true)
SetVariable("treant_auto_Siphoning", "false")
else SetVariable("treant_auto_Siphoning", "false")
end
</send>
</trigger>
</triggers>
I'm confused! And I just can't see what's wrong. Here;s the error message:
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.