A plugin that just won't work

Posted by Artel on Sun 21 Jan 2007 12:14 AM — 4 posts, 19,921 views.

USA #0
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, January 20, 2007, 6:01 PM -->
<!-- MuClient version 3.75 -->

<!-- Plugin "moontest" generated by Plugin Wizard -->

<muclient>
<plugin
   name="moontest"
   author="Artel"
   id="0d6083624cf1443d136b0e88"
   language="Lua"
   save_state="y"
   date_written="2007-01-20 18:00:34"
   requires="3.75"
   version="1.0"
   >

</plugin>


<!--  Triggers  -->

<triggers>
  <trigger
   enabled="y"
   group="Moons"
   match="^You notice the grey moon fall in the west\.$"
   name="GreyFall"
   regexp="y"
   script="onGreySet"
   sequence="100"
  >
  </trigger>
</triggers>

<!--  Script  -->


<script>
<![CDATA[
function onGreySet(sName, sLine, wildcards)
	world.Note("gset")
	world.SetVariable("greytimer", 0)
	world.SetVariable("graycatch", 1)
	world.Note([[world.GetVariable("greytimer") ]]..world.GetVariable("greytimer"))
end -- function
]]>
</script>


</muclient>

Nothing happens when the trigger message appears, even when I use my mud's echo command or MUSHclients ctrl+shift+f12 feature. Any ideas?
Amended on Sun 21 Jan 2007 12:15 AM by Artel
USA #1
I don't believe you need the double square brackets, I don't believe you need brackets at all for such a function call.

world.Note([[world.GetVariable("greytimer") ]]..world.GetVariable("greytimer"))


Should be...

world.Note(world.GetVariable("greytimer") .. world.GetVariable("greytimer"))

Laterzzz,
Onoitsu2
USA #2
The double square brackets create a string. I'm assuming that he chose to use them to print out what he was printing, followed by what the value of it was.
e.g. it would print:
world.GetVariable("greytimer")1

Unfortunately, I'm not sure what the problem is, though.
USA #3
Heh, I had triggers disabled in the trigger menu. For some reason I thought that plugins were unaffected by that option.