[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Lua
. . -> [Subject]  What does this Error mean

What does this Error mean

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Serve   (28 posts)  [Biography] bio
Date Tue 18 Sep 2007 06:23 PM (UTC)
Message
[string "Script file"]:1: unexpected symbol near '<'



getting it from trying to run this script


<TRIGGER>

<trigger
enabled="n"
group="rarestat"
match="Armor class is 115."
name="rareringstart"
send_to="12"
sequence="10"
other_text_colour="black"
other_back_colour="black"
>
<send>EnableTrigger("rareringstat", true)
EnableTrigger("rareringstop", true)
EnableTrigger("rareringstart", false)
stats = 0
highstat = 0
</send>
</trigger>

<TRIGGER>

<trigger
enabled="n"
group="rarestat"
match="^Affects (strength|intelligence|wisdom|dexterity|constitution|luck) by (\d)\.$"
name="rareringstats"
regexp="y"
send_to="12"
sequence="9"
other_text_colour="black"
other_back_colour="black"
>
<send>stats = stats + %2
if highstat < %2 then
highstat = %2
end
</send>
</trigger>

<TRIGGER>
<trigger
enabled="n"
keep_evaluating="y"
match="^.*$"
name="rareringstop"
regexp="y"
script="rarestat"
send_to="12"
sequence="11"
other_text_colour="black"
other_back_colour="black"
>
<send>EnableTrigger("rareringstat", false)
EnableTrigger("rareringstop", false)
if (stats==60) and ((highstat==35) or (highstat==25)) then
Send( "put rare bag" )
else
Send( "drop rare" )
end
</send>
</trigger>

and for the alias:

<aliases>
<alias
match="rareid"
enabled="y"
send_to="12"
>
<send>EnableTrigger("rareringstart", true)
Send("cast id rare")
</send>
</alias>
</aliases>
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #1 on Tue 18 Sep 2007 07:56 PM (UTC)

Amended on Tue 18 Sep 2007 09:33 PM (UTC) by Shaun Biggs

Message
Ah, I was right guessing in the other thread! :) Just to keep things a bit more centralized and easy to find, please keep related questions to one thread. It just makes things easier for you to find later, and it prevents repeating answers.

Pretty much you just have to copy the following and paste it into the client. (press ctrl-shift-8 and click on the 'paste' button in the lower right hand corner of the configuration window that pops up)

<triggers>
<trigger
   enabled="n"
   group="rarestat"
   match="Armor class is 115."
   name="rareringstart"
   send_to="12"
   sequence="10"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>EnableTrigger("rareringstat", true)
EnableTrigger("rareringstop", true)
EnableTrigger("rareringstart", false)
stats = 0
highstat = 0
</send>
  </trigger>

  <trigger
   enabled="n"
   group="rarestat"
   match="^Affects (strength|intelligence|wisdom|dexterity|constitution|luck) by (\d+)\.$"
   name="rareringstats"
   regexp="y"
   send_to="12"
   sequence="9"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>stats = stats + %2
if highstat &lt; %2 then
  highstat = %2
end
</send>
  </trigger>

  <trigger
   enabled="n"
   keep_evaluating="y"
   match="^.*$"
   name="rareringstop"
   regexp="y"
   script="rarestat"
   send_to="12"
   sequence="11"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>EnableTrigger("rareringstat", false)
EnableTrigger("rareringstop", false)
if (stats==60) and ((highstat==35) or (highstat==25)) then
  Send( "put rare bag" )
else
  Send( "drop rare" )
end
</send>
  </trigger>
</triggers>

<aliases>
  <alias
   match="rareid"
   enabled="y"
   send_to="12"
  >
  <send>EnableTrigger("rareringstart", true)
Send("cast id rare")
  </send>
  </alias>
</aliases>


Then have the following be your script file:

stats = 0
highstat = 0

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #2 on Tue 18 Sep 2007 08:00 PM (UTC)
Message
Okay i went to copy it to triggers and I got this as an error.

Line 32: Element name must start with letter or underscore, but starts with " " (problem in this file)

i really appreciate all your time and effort in trying to help me solve this issue.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #3 on Tue 18 Sep 2007 08:20 PM (UTC)
Message
Ok, tracked down the error. I forgot to use &lt; rather than < in the xml for one of the triggers. Also fixed the capture for the stats so it will actually recognize affects greater than 9.

<triggers>
<trigger
   enabled="n"
   group="rarestat"
   match="Armor class is 115."
   name="rareringstart"
   send_to="12"
   sequence="10"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>EnableTrigger("rareringstat", true)
EnableTrigger("rareringstop", true)
EnableTrigger("rareringstart", false)
stats = 0
highstat = 0
</send>
  </trigger>
  <trigger
   enabled="n"
   group="rarestat"
   match="^Affects (strength|intelligence|wisdom|dexterity|constitution|luck) by (\d+)\.$"
   name="rareringstats"
   regexp="y"
   send_to="12"
   sequence="9"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>stats = stats + %2
if highstat &lt; %2 then
  highstat = %2
end
</send>
  </trigger>
  <trigger
   enabled="n"
   keep_evaluating="y"
   match="^.*$"
   name="rareringstop"
   regexp="y"
   script="rarestat"
   send_to="12"
   sequence="11"
   other_text_colour="black"
   other_back_colour="black"
  >
  <send>EnableTrigger("rareringstat", false)
EnableTrigger("rareringstop", false)
if (stats==60) and ((highstat==35) or (highstat==25)) then
  Send( "put rare bag" )
else
  Send( "drop rare" )
end
</send>
  </trigger>
</triggers>

<aliases>
  <alias
   match="rareid"
   enabled="y"
   send_to="12"
  >
  <send>EnableTrigger("rareringstart", true)
Send("cast id rare")
  </send>
  </alias>
</aliases>

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #4 on Tue 18 Sep 2007 08:31 PM (UTC)
Message
okay so i finally got all the triggers and alias where they need to go with no errors now what do i do to activate this the script so it will identify the eq and determine if it meets the stats i need and will drop it or put it in my bag
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #5 on Tue 18 Sep 2007 09:49 PM (UTC)
Message
okay 1 more thing for this part of the first trigger


triggers>
<trigger
enabled="n"
group="rarestat"
match="Armor class is 115."
name="rareringstart"
send_to="12"
sequence="10"
other_text_colour="black"
other_back_colour="black"


what do i need to put in for the match= space if the armor class amount is random. The 115 can be any number almost.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #6 on Tue 18 Sep 2007 11:29 PM (UTC)
Message
To id the rings, just type rareid. That is what the alias matches to get this whole thing started off.

In that case, have it be match="Armor class is *" instead. The two examples you initially gave both had 115 as the armor value, so I thought that it was a standard value.

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #7 on Tue 18 Sep 2007 11:54 PM (UTC)
Message
okay got it to id the random valure for the ac but now this happens.


Your eyes glow bright yellow for a moment.
Object 'plate rare' is type armor, extra flags none.
Weight is 15, value is 0, level is 10.
Armor class is 125.
Affects strength by 5.
Affects intelligence by 15.
Affects wisdom by 5.
Affects dexterity by 5.
Affects constitution by 5.
Affects agility by 25.
drop rare
This item has 50 points of magical resistance.


it wont put it in the girdle even if it meets the specified requirments.
[Go to top] top

Posted by Serve   (28 posts)  [Biography] bio
Date Reply #8 on Wed 19 Sep 2007 12:09 AM (UTC)
Message
Hey Shaun thanks a lot i had someone help me we got it up an running i really APPRECIATE all your help.
[Go to top] top

Posted by Shaun Biggs   USA  (644 posts)  [Biography] bio
Date Reply #9 on Wed 19 Sep 2007 12:35 AM (UTC)
Message
Ok, this should be set now. Had two typos in the triggers. The trigger to match the stats was never actually turned on. I actually tested it out this time, and it worked fine. One of these days I'll remember to only post stuff I've tested out instead of just what I think will work in theory.

<triggers>
  <trigger
   group="rarestat"
   keep_evaluating="y"
   match="^.*$"
   name="rareringstop"
   regexp="y"
   send_to="12"
   sequence="11"
  >
  <send>EnableTrigger("rareringstat", false)
EnableTrigger("rareringstop", false)
if (stats==60) and ((highstat==35) or (highstat==25)) then
  Send( "put rare bag" )
else
  Send( "drop rare" )
end</send>
  </trigger>
  <trigger
   enabled="y"
   group="rarestat"
   match="^Affects (strength|intelligence|wisdom|dexterity|constitution|agility) by (\d+)\.$"
   name="rareringstats"
   regexp="y"
   send_to="12"
   sequence="9"
  >
  <send>stats = stats + %2
if highstat &lt; %2 then
  highstat = %2
end</send>
  </trigger>
  <trigger
   group="rarestat"
   match="Armor class is *."
   name="rareringstart"
   send_to="12"
   sequence="10"
  >
  <send>EnableTrigger("rareringstats", true)
EnableTrigger("rareringstop", true)
EnableTrigger("rareringstart", false)
stats = 0
highstat = 0
</send>
  </trigger>
</triggers>

It is much easier to fight for one's ideals than to live up to them.
[Go to top] top

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.


22,464 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]