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
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Mon Jan 10, 2011 9:34 pm   

CMud freezes on exiting mud
 
Running CMud v 3.33a on Win 7...

I exit from my mud via the typical EXIT command. A few scripts that I have fire on the final message from the mud (closing a log file) etc, but then CMud freezes. The logout chime doesn't play. There are no error messages, no commands work. I have to crash it from the Task Manager and then open CMud again in order to continue.

This doesn't happen every time, only occasionally. As far as I can see, there are no differences between sessions when this does happen vs. when it doesn't.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jan 11, 2011 1:23 pm   
 
This could be caused by an infinite loop or something similar in your logout scripts. Post the code for all these scripts here, within code tags.
Reply with quote
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Tue Jan 11, 2011 3:44 pm   
 
Okay, I might be answering my own question here.

I have several classes that open based upon which character I log in. My immortal vs. archer, etc.

The error usually happens when I'm exiting my Immortal character. The only two big differences are:

Login script for Immortal:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger priority="1730">
    <pattern>^Ah, the Immortal Shezmu has returned! Addicted, eh?$</pattern>
    <value>#CLASS Immortal_Events 1
#log C:\Users\MyProfile\Documents\Avatar\Logs\%time(m-d-yyyy).txt
time
#t- ticktimer
</value>
  </trigger>
</cmud>


And the logout script:
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <trigger priority="2880">
    <pattern>May your stay in reality be worthwhile.</pattern>
    <value>#addkey LastGear @myname (@currgear)
#var message ""
#var currgear ""
#t+ ticktimer
#class AmmoCount 0
#CLOSE AmmoCount
#class ArcherClass 0
#CLASS Immortal_Events 0

</value>
  </trigger>
</cmud>


I think because the #LOG is never being specifically closed, could this cause the occasional problems? If so, what is the best way to close this as part of the script, #CLOSE command?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jan 11, 2011 4:32 pm   
 
No, it should not be necessary to explicitly close the logfile. That gets done automatically.
But I'm not sure why you are doing most of that stuff you have in the logout script. If you want @message and @currgear to be blank after logout, you can just make blank the default value. If you want certain classes disabled after logout, you can set them to automatically be disabled on login. There are settings to do these things in the Package Editor. The only thing that looks important in your logout script is the #ADDKEY.

That said, I don't see anything in this scrript that would cause any kind of loop or freeze. Could you post the other logout scripts you have?
Reply with quote
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Tue Jan 11, 2011 5:44 pm   
 
That's it for logout scripts. Thanks for the input on the settings in the Package Editor. I need to explore around a bit, because I know there are features that I haven't used or learned to use yet. I'll play around with it and clean my scripts up a bit. They're quite the mess. I never really used ZMud, and only recently started using CMUd, so there's a lot of new stuff for me.

If it's not the #LOG, I'm not sure what could be doing it.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jan 11, 2011 6:29 pm   
 
It may be worth cleaning up the scripts. There nothing _wrong_ that I can see in the scripts, it's just that it can be done more efficiently. For instance, if a variable has a default setting, Cmud won't even try to save the value to the disk, which it normally would do every time the value changed. This saves quite a bit of overhead, you can imagine. It's possible that cleaning up your scripts will solve something that I'm not seeing. But it may be something else. Nothing is coming to mind just now. It might be good to check your other scripts, especially scripts which might be dependent on the variables or classes in the logout script.
Reply with quote
Shezmu
Wanderer


Joined: 23 Apr 2010
Posts: 53

PostPosted: Tue Jan 11, 2011 6:31 pm   
 
I'll give it a try. Like I said, it only occurs occasionally. It's not a consistent thing, and there aren't any particular events that I can see beforehand that cause it. Thanks for the pointers on cleaning my scripts.
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