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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Fritzel
Beginner


Joined: 26 Oct 2004
Posts: 14

PostPosted: Tue Oct 26, 2004 8:08 pm   

Timing issue with an alias that is called from a trigger
 
Code:
showdebug

Code:

#if (@debug >= 1) {
  #var debugcolor0 %eval( %char( 27)~[1~;31m)
  #var debugcolor1 %eval( %char( 27)~[1~;33m)
  #var debugcolor2 %eval( %char( 27)~[1~;37m)
  #var debugcolor3 %eval( %char( 27)~[1~;32m)
  #unvar debugtmpparam
  #if (@debug >= 10) {
    #loop %numparam( ) {
      #var debugtmpparam %concat( @debugtmpparam, %eval( @debugcolor3) , "|", %eval( @debugcolor2)%param( %i))
      #noop
      }
    #echo @debugtmpparam
    }
  #loop %numparam( ) {
    #var debugcycle %i
    #echo %eval( @debugcolor0)DEBUG: %eval( @debugcolor3)@debugcycle %eval( @debugcolor1)of %eval( @debugcolor3)%numparam( )%eval( @debugcolor2): %eval( @debugcolor1)%param( @debugcycle) %eval( @debugcolor2)%eval( %param( @debugcycle))
    }
  }


The Simple version is this alias accepts variable names in the form of @varname and displays the number of variables passed to it the variable name and contents.

when I call this alias from a trigger:
Code:
^~|                  (%w) (*)

Code:
#var char {%1}
#var title {%2}
showdebug @char @title


with this information:
Code:
|                  Fritzel the Fighter                                    |


The following output is generated:
Code:
DEBUG: 1 of 2: @char Fritzel
DEBUG: 2 of 2: @title the Fighter                                    |


Which is normally fine, however when I run multiple triggers capturing all of my score sheet into variables I run into a timing issue which you can see here:

Code:
+-------------------------------------------------------------------------+
|                  Fritzel the Fighter                                    |
DEBUG: 1 of 2: @char Fritzel
DEBUG: 2 of 2: @title the Fighter                                    |
+--------------------------+-------------------+--------------------------+
| Strength     : [ 30/25 ] | Race : Quickling  | Practices    : [     0 ] |
DEBUG: 1 of 4: @curstr 30
DEBUG: 2 of 4: @basestr 25
| Intelligence : [ 26/25 ] | Class: Ranger     | Trains       : [     3 ] |
DEBUG: 1 of 4: @curint 26
DEBUG: 2 of 4: @baseint 25
| Wisdom       : [ 30/25 ] | Sex  : Male       | Trivia       : [     0 ] |
DEBUG: 1 of 4: @curwis 30
DEBUG: 2 of 4: @basewis 25
| Dexterity    : [ 29/25 ] | Level: 18         | Quest points : [    29 ] |
| Constitution : [ 36/30 ] |                   | Quest time   : [     0 ] |
| Luck         : [ 27/25 ] |                   |                          |
+------------------------+-+-------------------+--------------------------+
| Hit    : [  357/357  ] | Hitroll  : [   39 ] | Weight :   227 of 288    |
| Mana   : [  369/369  ] | Damroll  : [   24 ] | Items  :    58 of 126    |
| Moves  : [  423/423  ] | Wimpy    : [   55 ] | Pos    : Sleeping        |
| Gold   : [    360320 ] | Saves    : [    0 ] | Align  : 480   Good      |
| Exp    : [     20114 ] | Age      : [   19 ] | Hunger :  0/0  (Hungry)  |
| To Lvl : [       786 ] | Hours    : [   45 ] | Thirst : 0     (Thirsty) |
+------------------------+---------------------+--------------------------+
| Pierce :    58 (Somewhat armored  ) [****------------------------------]|
| Bash   :    57 (Somewhat armored  ) [****------------------------------]|
| Slash  :    58 (Somewhat armored  ) [****------------------------------]|
| Exotic :    46 (Somewhat armored  ) [***-------------------------------]|
+-------------------------------------------------------------------------+
 Type 'aff' for affects, 'attr' for stats only and 'whois' for other info.

<357/357hp 369/369m 423/423mv 786tnl>  Dbl: 37
DEBUG: 3 of 4: @sex Male
DEBUG: 4 of 4: @trivia 0
DEBUG: 3 of 4: @sex Male
DEBUG: 4 of 4: @trivia 0
DEBUG: 3 of 4: @sex Male
DEBUG: 4 of 4: @trivia 0


Throughout this whole test debug is set to level 1 (@debug = 1)

Can anyone suggest anything as to how I can fix this timing issue?

Thank you in advance :)

Fritzel
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Oct 27, 2004 10:05 am   
 
Put your #LOOPs in a #PRIORITY command.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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