Fritzel Beginner
Joined: 26 Oct 2004 Posts: 14
|
Posted: Tue Oct 26, 2004 8:08 pm
Timing issue with an alias that is called from a trigger |
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: |
#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 |
|