|
Dyron Apprentice
Joined: 08 Apr 2004 Posts: 103 Location: USA
|
Posted: 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. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4662 Location: Pensacola, FL, USA
|
Posted: 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. |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|
|
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
|
|