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
Dyron
Apprentice


Joined: 08 Apr 2004
Posts: 103
Location: USA

PostPosted: Tue May 15, 2018 4:17 am   

CMud Random Lock Up Issue
 
I use the same version of CMud on my home PC and my work PC. My work PC is actually a much nicer computer but for some reason my system has started crashing on it but not on my home PC. Both are running the same exact scripts.

On my work PC the screen will just lock up. It doesn't crash, doesn't show a loop, or anything. When I look at the screen it just seems to be at a random spot that I can only think of two things that might of been running. My prompt trigger or it might be the balance trigger but it never shows on the screen. I've check both closely and the only thing that I think could be causing issue is the following code:

Code:

#if (%ismember( Basher, @Misc)) {
  $addcreature = %gmcp.char.items.add
    #forall $addcreature {
      #if ((%match($addcreature, "id=(%d)|name=(*)|icon=(%w)|attrib=(%w)", $id, $name, $icon, $attrib)) and (($attrib = "m" or $attrib = "ma")) and (%iskey(@KillMobs, $name)) and (!%iskey(@Roommobs, $id))) {
      #say Adding $id to room creatures
      #addkey RoomMobs $id %db(@KillMobs,$name)
      #break
    }
    #if ((%match($addcreature, "id=(%d)|name=(*)|attrib=(%w)", $id, $name, $attrib)) and (($attrib = "m" or $attrib = "ma")) and (%iskey(@KillMobs, $name)) and (!%iskey( @RoomMobs, $id))) {
      #say Adding $id to room creatures
      #addkey RoomMobs $id %db(@KillMobs,$name)
      #break
    }
  }
}


Does anything in there look like it could be causing the issue?

The reason I have to use a forall is the fact that %gmcp.char.items.add adds two parts to the variable.
First part is location=room
The second part being the "id=(%d) etc..

Is my code causing the issue maybe? It's kinda simple but it's the best way I could think of.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 3740
Location: Pensacola, FL, USA

PostPosted: Tue May 15, 2018 5:44 pm   
 
If it is only happening on one system, and things are identical otherwise, corruption seems the likely culprit.

I would try using a copy of the files from home; failing that, reinstall CMUD.

You can also export to XML instead of using the home files.

A minor parenthetic issue, should be:
(($attrib = "m") or ($attrib = "ma"))

But I don't see that causing any performance issues.
Syntax looks fine to me otherwise.
_________________
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
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