Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Kevadrin
Newbie


Joined: 29 Jul 2011
Posts: 8

PostPosted: Tue Aug 16, 2011 4:49 am   

double commnds
 
I am having a problem with my auto sipper shooting out double commands.

I have a trigger on my prompt that calls an alias asip.
asip calls an alias h (sip health)or m(sip mana).

my triggers for sip balance was set to the response from actual sipping, but it doesn't fire until after two or three sips have shot through.

I turned around and put the sip balance off in the h alias, but it still shoots off two sips.

Can someone help me?
Reply with quote
Kevadrin
Newbie


Joined: 29 Jul 2011
Posts: 8

PostPosted: Tue Aug 16, 2011 5:23 am   
 
I am trying to set the sip balance off in the h alias, under an IF statement, but its giving me an error.

Code:

#if (@sipbal = 1) {Sip Health;sipbal = 0}


ERROR: Syntax error in Alias: h : illegal token: = 0
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Tue Aug 16, 2011 8:16 am   
 
Should be
#if (@sipbal == 1) {Sip Health;sipbal = 0}
one "=" is an assignment operation, not logical expression expected by #IF

Post your trigger here (copy from xml tab in the Package editor) or just turn on "Show scripting debug messages" option (Options/Scripting/General Scripting) to see what triggers you auto sipper twice.
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Tue Aug 16, 2011 1:18 pm   
 
The == may be needed if you have lua turned on, but not necessary with zScript. Also, his error indicates the illegal token is =0, not =1.

Usually, when I get an "illegal token" error, it's a syntax error caused by a missing or misplaced brace. As Arde said, post the full trigger/script if you would like help debugging it.
_________________
.geniusclown
Reply with quote
Kevadrin
Newbie


Joined: 29 Jul 2011
Posts: 8

PostPosted: Tue Aug 16, 2011 11:34 pm   
 
for some reason the ; wasn't separating out the commands. For some reason, it fixed itself.

I am having problem with the prompt trigger capturing statuses. I will make my character sit, and see the p in the prompt, and the button won't illuminate until the mud sends something, and I stand up.
Code:

<trigger name="Prompt" priority="11690" id="1169">
  <pattern>H:%1 M:%2 E:%3 W:%4 X:%5 D:%6 - %7 %8</pattern>
  <value>#var health %1 {} Stats
#var mana %2 {} Stats
#var endurance %3 {} Stats
#var willpower %4 {} Stats
#var level_percentage %5 {} Stats
#var devotion %6 {} Stats
#if %pos( e, %7) {EquilibriumBal = 1} {EquilibriumBal = 0}
#if %pos( b, %7) {Balance = 1} {Balance = 0}
#if %pos( p, %8) {prone = 1} {prone = 0}
#if %pos( f, %8) {flying = 1} {flying = 0}
#if %pos( d, %8) {DefDeaf = 1} {DefDeaf = 0}
#if %pos( b, %8) {DefBlind = 1} {DefBlind = 0}
#if %pos( s, %8) {stunned = 1} {stunned = 0}
#if %pos( @, %8) {extradimensional = 1} {extradimensional = 0}
asip</value>
</trigger>


Code:

<button name="btn_Prone" type="Gauge" autosize="false" width="70" height="20" autopos="false" left="0" top="215" toolbar="3" color="red" textcolor="#8000FF" priority="11940" id="1194">
  <caption>Prone</caption>
  <expr>@prone</expr>
  <gaugemax>1</gaugemax>
  <gaugelow>0</gaugelow>
</button>

Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Aug 17, 2011 3:13 am   
 
The problem is that your prompt trigger is actually a newline trigger. This means it will wait until the next-received newline before anything is executed. Change your Trigger on options.
_________________
EDIT: I didn't like my old signature
Reply with quote
Kevadrin
Newbie


Joined: 29 Jul 2011
Posts: 8

PostPosted: Wed Aug 17, 2011 5:52 am   
 
okay, should I set it to trigger on prompt?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net