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
mr_tuomittu
Newbie


Joined: 12 Jan 2008
Posts: 4

PostPosted: Sat Jun 12, 2010 9:27 am   

Buglist for 3.17 - 3.19
 
First (3.18, 3.19):

I have lines like this coming from mud "1. Tester cmd: - hp:(1871/1871) sp:( 583/ 583) lvl: 101 xp: 0"
I capture them into a database record type variable with following trigger: ^(%d). (%w) * (???) hp:?(????)?(????)? sp:?(????)?(????)?*
Then I show that variable in my status window.

(Might not be prettiest and most effective trigger capture and code but hell, it worked fine before 3.18 :))

Code:
#gag
$calculation = %eval(%trim(%4)*100/%trim(%5))
$nam = %2
$name = %1 + ". "+$nam+%repeat( " ", 12-%len( $nam))
$tgt = "tgt" + %1
partys.$tgt = %lower($nam)
$pf = ""
#if (%3 == "off") {
  $pf = %ansi(4)%3%repeat( " ", 3-%len( %3))%ansi(def)
} {
  $pf = %ansi(10)%3%repeat( " ", 3-%len( %3))%ansi(def)
}
$hp = ""
$hpmax = ""
#if ($calculation > 90) {
  $hp = %repeat( " ", 3-%len( %4))%ansi(10)%4%ansi(def)
}
#if ($calculation <= 90 and $calculation > 45) {
  $hp = %repeat( " ", 3-%len( %4))%ansi(14)%4%ansi(def)
}
#if ($calculation <= 45) {
  $hp = %repeat( " ", 3-%len( %4))%ansi(12)%4%ansi(def)
}
$maxhp = %repeat( " ", 3-%len( %5))%5
$sp = %repeat( " ", 3-%len( %6))%6
$maxsp = %repeat( " ", 3-%len( %7))%7
$var = "mbr"%1
partys.$var = $name + " St:" + $pf + " Hp:" + $hp + "(" + $maxhp + ") Sp:" + $sp + "(" + $maxsp + ")"
#show @partys.$var


This trigger results

Lower picture is from alarm trig which sends party status command to mud in every 4 seconds.
party status command produces that line I mentioned earlier.



Also noted that using local variable as a key for variable doesn't work anymore in 3.18 and 3.19, worked nicely with 3.17

In following case $var is for example mbr1. So @party variable has key mbr1and mbr1has value as shown below.

partys.$var = $name + " St:" + $pf + " Hp:" + $hp + "(" + $maxhp + ") Sp:" + $sp + "(" + $maxsp + ")"


Second (3.17-3.19)

I don't use Mapping in cmud, I once might have tried it but I don't really use it. Still my cmud opens several maps when I start my session. Dunno really what the hell has happened here and haven't clue about the steps to reproduce. Tried to disable Mapping, tried to delete all map related files and still cmud opens several maps.

Reply with quote
Martaigne
Wanderer


Joined: 05 Jan 2002
Posts: 88
Location: Atlanta, GA

PostPosted: Sat Jun 12, 2010 3:27 pm   
 
I had the same issue with the mapper going haywire. I exported all of my settings, deleted my session, deleted my session files, created a new session, and imported the xml code, and the mapper issue resolved itself. I had no idea what happened to mine either.
_________________
Unwritten Legends
Reply with quote
mr_tuomittu
Newbie


Joined: 12 Jan 2008
Posts: 4

PostPosted: Mon Jun 14, 2010 2:31 pm   
 
Thanks for the tip. Only problem is that I get access violation while exporting which results corrupted xml settings file :)
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jun 14, 2010 4:54 pm   
 
Sounds like perhaps it's too far gone for exporting. If that's the case, your options are either going to be really simple (delete the file and make new ones) or really tedious (try to open the file in a DB editor, then copy and paste bits and pieces).

If you can see the XML code in the xml file instead of a bunch of gibberish, you can perhaps copy the parts that still look correct (essentially, just copy stuff between each pair of <tag>...</tag> labels). To import these bits, you'd just copy to the clipboard and use CTRL-V with the settings tree having the focus.
_________________
EDIT: I didn't like my old signature
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jun 14, 2010 5:15 pm   
 
Something is definitely corrupted.

1) I tried your trigger given above along with your test line:

1. Tester cmd: - hp:(1871/1871) sp:( 583/ 583) lvl: 101 xp: 0

and I did not get any Loop Detected message. So there is some other trigger running on your #SHOW results from the last line of your script that is causing this problem.

2) Using a local variable for a database key works fine. Here is a test:
Code:
db={name=zugg|level=20|race=dwarf}
$i=name
#SHOW @db.$i

Works fine here.

3) That shows your package is corrupted and has several database objects in it. As mentioned above, you'll need to export your package and then manually delete these extra database objects. You can try deleting them from the package editor, but if something else is corrupted in your scripts, the problem might reoccur.

I also suggest that you load your session by holding down the SHIFT Key when you click the Open Offline action to reset your window layout in case you have a bunch of multiple map windows hidden in your layout that might be causing these duplicate map objects to be created.

Btw, in the future, please only post ONE bug in a forum topic. To report more than one bug, create more than one forum topic.
Reply with quote
mr_tuomittu
Newbie


Joined: 12 Jan 2008
Posts: 4

PostPosted: Mon Jun 14, 2010 6:54 pm   
 
Ok, thanks a lot. Going to try these tips. And yes, next time I'll post only one bug per topic :)
Reply with quote
mr_tuomittu
Newbie


Joined: 12 Jan 2008
Posts: 4

PostPosted: Tue Jun 15, 2010 4:47 am   
 
Ok, problem solved for now.

Buggy line was this: partys.$var = $name + " St:" + $pf + " Hp:" + $hp + "(" + $maxhp + ") Sp:" + $sp + "(" + $maxsp + ")"

Somehow these gave infinite loop:

$maxhp = %repeat( " ", 3-%len( %5))%5
$sp = %repeat( " ", 3-%len( %6))%6

I added %trim to %5 and %6 since variables could have whitespace in front of them, i.e. " 567"
and loop problem was solved. Another problem was that $name variable.

When I used #show $name + " St:" + $pf + " Hp:" + $hp + "(" + $maxhp + ") Sp:" + $sp + "(" + $maxsp + ")"
it printed the line correctly but when tried to assign that line into partys.mbr1 it didn't work. Problem was here:

$nam = %2
$name = %1 + ". "+$nam+%repeat( " ", 12-%len( $nam))

Above variable contains string "1. Player St:- Hp:1871(1871) Sp:583(583)"

Somehow the dot in that string caused that the string didn't assign to that partys variable. Changed the dot into ")" and string was again good to assign in partys.mbr1

Weird but it works now, thanks all. Also that map problem solved by wiping whole cmud installation and fresh install.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 15, 2010 5:07 pm   
 
I have confirmed the bug with the variable assignment. Here is my simpler test case to get this to fail:
Code:
var.key = "1. Name" + " test"
#show @var

displays "key=1." instead of "key=1. Name test"

So I've added this to the bug list.
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