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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon Nov 12, 2007 8:20 am   

[2.11] Expression trig behaviour, possible link to default var bug
 
Code:
<trigger type="Expression" priority="9810" id="981">
  <pattern>@eqbal=eb &amp;&amp; @armb=lr</pattern>
  <value>#IF (@aq) {
#EXE @nextattack
intel_howl
aq=0
  } {intelligence_eqbal}
#IF (@amon) {#SH You have recovered balance on all limbs.}</value>
</trigger>

That is to say:
#TR (@eqbal=eb && @armb=lr) {dostuff}

Code:
0.0009 |   Aetolia |  [1] Aetolia Macro : start : armb=xy;eqbal={--}
0.0014 |   Aetolia |    [1] Var "armb" changed from "lr" to "xy"
0.0007 |   Aetolia |    [1] Var "eqbal" changed from "eb" to "--"
0.0011 |   Aetolia |  [1] Aetolia Macro : stopped
5.7289 | ---
0.0084 |   Aetolia |  [1] Aetolia Macro : start : armb=lr;eqbal={eb}
0.0074 |   Aetolia |    [1] Var "armb" changed from "xy" to "lr"
0.0082 |   Aetolia |    [1] Var "eqbal" changed from "--" to "eb"
0.0112 |   Aetolia |  [1] Aetolia Macro : stopped
26.550 |   Aetolia |  Expression: @eqbal=eb && @armb=lr


Note the timestamp on the expression trigger. Whenever I closee the session and start it again, this expression trigger never fires. It fired in this instance, after 26 seconds, because I opened up the package editor, selected this expression trigger, and clicked on the XML tag. Immediately upon doing this, it fired (I was watching the debug window as I did this.).

Once I have done this, it works correctly from then on, until I close/open the session again.

I cannot explain this behaviour, but it is possibly linked to the variables with default values that are not being set upon startup bug, as @armb is one of those (it always gets given a null value, and I have to set it to "lr" at the command line before I can play.)

I will investigate this further and post any findings.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon Nov 12, 2007 8:56 am   
 
I have posted to Vijilantes thread on default value variables not being initialised .. well, ever. Just briefly though, my test consisted of choosing one of the muds from the character selection screen that I do not play, to be sure to get a blank session file.

I created a new package from there, called 'bugtest'. In that package I created a class called "test" and in that class I created two variables (@eqbal and @armb) with the default values of eb and lr respectively. I made sure to check 'use default value".

Then, upon closing CMUD and starting up (or just closing session and connecting again), I found both variables to have been given null values, rather than the default values I set.


Right. So upon reporting that bug to the relevant thread (Vigilantes) I then set about testing an expression trigger. I created an expression trig:
#TR (@eqbal=eb && @armb=lr) {#SH balanced}
Then, from the command line, set the variables to different values, and then back to the values that will make this trigger fire. This worked correctly. I then saved (both with file>save from the package editor menu, and with #save at the command line), closed the session and reconnected, and discovered that the expression trigger I had created did not exist. I repeated this 4 times to make sure it was not an anomaly, and it failed to save all four times.

I tried closing CMUD completely instead of closing the session, and this time the setting saved. A separate bug (or somehow linked? I will investigate more, meh. For now.. back to the expression trig bug at hand.


Upon finally managing to connect and have my expression trigger actually in existence, I set the null values of those two variables to their correct default values, then changed them to something else random... and back to their correct default values (all from the command line, I should specify).

Upon doing this.. the expression trigger did not fire. I felt close to having replicated the bug, so I opened up the debugger, opened up the package editor, changed the vars away and back again, waited for about 20 seconds, then clicked on that XML tab - and nothing happened.

I cannot get this expression trigger to work at all now.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon Nov 12, 2007 9:11 am   
 
Sorry for yet another post.. but I installed 2.11 again (to a different HD partition, actually) and before copying any package files over to the new installation, I connected to materia magica, created a new package, a new class, a new variable with a default value. Saved, restarted CMUD, connected to Materia Magica again, and found the variable to have a null value.

I then opened the debugger, and closed the session with it still open, then connected again. Just in case that is somehow useful.
Sorry if this is an overload of test info, it just seems that everything I do that is somehow linked to these variables doesn't work right, and it only seems worse in 2.11 so I want to make sure I do enough testing :S

Code:
       |
0.0010 |  materiam |  [1] materiamagica_def.mud Comline : start : armb=lr
0.0030 |  materiam |  [1] materiamagica_def.mud Comline : stopped
21.189 | ---
0.0010 |  materiam |  [1] materiamagica_def.mud Comline : start : #sh @armb
0.0027 |  materiam |By what name shall we know thee? lr
0.0011 |  materiam |  [1] materiamagica_def.mud Comline : stopped
5.3451 | ---
0.0007 |  materiam |  [1] materiamagica_def.mud Comline : start : #sh @armb
0.0010 |  materiam |lr
0.0018 |  materiam |  [1] materiamagica_def.mud Comline : stopped
12.829 | ---
0.0006 |  materiam |  [1] materiamagica_def.mud Comline : start : #save
0.4024 |  materiam |Settings saved.
0.0017 |  materiam |  [1] materiamagica_def.mud Comline : stopped
6.0707 |  materiam |
6.5498 |  materiam |Connected to host materiamagica.com
0.7662 |  materiam ><IAC><DONT><EOR>
0.0008 |  materiam ><IAC><DO><3>
0.0005 |  materiam |Connected to host materiamagica.com
0.0008 |  materiam ><IAC><DO><86>
0.0008 |  materiam |Connected to host materiamagica.com
0.0008 |  materiam ><IAC><DO><91>
0.0005 |  materiam |Connected to host materiamagica.com
0.0007 |  materiam ><IAC><DO><90>
0.0008 |  materiam |Connected to host materiamagica.com
0.0010 |  materiam |
0.0007 |  materiam |CONNECT OK
0.0010 |  materiam |Welcome to Materia Magica!
0.0008 |  materiam |66.219.44.169
0.0043 |  materiam |MATERIAMAGICA.COM
0.0020 |  materiam |
0.0008 |  materiam |  .-.-.   '`  .---  .--.  .--. '`  '`
0.0012 |  materiam | || | || ||-|  ||  ||-.  ||-.' || ||_|
0.0009 |  materiam | `|   |' || ;  ||  `|__, `|  ; || || |
0.0008 |  materiam |      '     '  '             '  '    '
0.0018 |  materiam |    .-.-.   '`   .--. '`  .--.  '`
0.0009 |  materiam |   || | || ||-| ||._' || ||    ||-|
0.0012 |  materiam |   `|   |' |; | `|__| ||  _, |; |
0.0008 |  materiam |        '     '     ' `'          '
0.0008 |  materiam |
0.0024 |  materiam |MATERIA MAGICA is production of Ingenii Interactive Co.
0.0013 |  materiam |Copyright (c) 1995-2007 Ingenii Interactive Co., All Rights Reserved.
0.0009 |  materiam |
0.0007 |  materiam |New players, please type NEW.
0.0007 |  materiam |By what name shall we know thee?
15.462 | ---
0.0028 |  materiam |  [2] materiamagica_def.mud Comline : start : #sh @armb
0.0051 |  materiam |By what name shall we know thee?
0.0017 |  materiam |  [2] materiamagica_def.mud Comline : stopped
5.8624 | ---
0.0007 |  materiam |  [2] materiamagica_def.mud Comline : start : #sh @armb
0.0009 |  materiam |
0.0015 |  materiam |  [2] materiamagica_def.mud Comline : stopped
8.4460 | ---
0.0007 |  materiam |  [2] materiamagica_def.mud Comline : start : armb=lr
0.0010 |  materiam |  [2] materiamagica_def.mud Comline : stopped
4.5967 | ---
0.0010 |  materiam |  [2] materiamagica_def.mud Comline : start : #sh @armb
0.0009 |  materiam |lr
0.0017 |  materiam |  [2] materiamagica_def.mud Comline : stopped
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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