|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Wed Jan 14, 2009 8:00 pm
CMUD crashing on a unique disconnect |
CMUD has never crashed on a normal disconnect for me, so I find this odd. You roll for stats in my MUD, like many others. So I made a stat roller to get the best results. The problem is that the game boots you after awhile and you have to log back in and run the stat roller again. That's how it's supposed to work, but now CMUD seems to crash whenever the MUD forces me to disconnect in this way (from rolling) and I'm not sure what to do or what might be causing it.
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Jan 14, 2009 8:42 pm |
Post the crash dump and it might give me more of a clue.
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Wed Jan 14, 2009 8:46 pm |
There wasn't a crash dump, it actually just sort of froze and I had to manually end the task. But I figured out that it wasn't the connection after all. I did some thinking and went back to the roller I was using...
Code: |
<trigger priority="1270" regex="true" id="127">
<pattern>^(?:Keep these stats\? \(Y/N\) )?\[Str: (\d+) Int: (\d+) Wis: (\d+) Dex: (\d+) Con: (\d+)\]$</pattern>
<value>$total=%1+%2+%3+%4+%5
#sayadd $total
#IF (%1+%2+%3+%4+%5<245)
{
No
}
{
#say Target reached!
}
</value>
</trigger>
|
That works. However, when I didn't have an else statement after the IF it would freeze when it's true. That's bad code on my part, but it does still seem a little funny that it wouldn't simply just sit there, instead of freezing (I guess it's literally just sitting there). |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Jan 14, 2009 9:41 pm |
Do you get the same problem with triggers disabled i.e. if you keep rolling stats manually? Do you have any onDisconnect events defined?
[Edit] Clicked submit late. Based on what you said, is it freezing or waiting for you to send something to the MUD to say you accept those stats? |
|
_________________ Asati di tempari!
Last edited by Tech on Wed Jan 14, 2009 10:41 pm; edited 1 time in total |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Wed Jan 14, 2009 10:09 pm |
onDisconnect ends the current log in progress, I have occasional problems with it because there is no log being made and it wants to know what log I'm writing to or something silly like that. I suppose that could be some of the problem, but I think in this specific instance it had to do with the not having an else statement.
|
|
|
|
|
|