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
shalimar
GURU


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

PostPosted: Thu Jan 17, 2008 1:17 pm   

[2.18] CMUD Hangs indefintely
 
It doesnt happen everytime, but this little snippit of code really seems to bother CMUD.

#WHILE (%iskey( @{@fish}, ${length}Min)) {#IF (@fishdistance<%db( @{@fish}, ${length}Min)) {#SAY {Speedchange};$length=%item(@reels, %eval(%ismember($length, @reels)-1))}}


reels="all|short|medium|long"
$length=long
fish= one word noun for the fish i caught, salmon, bass, ect
fishdistance= integer between 1-70
_________________
Discord: Shalimarwildcat
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Jan 17, 2008 3:21 pm   
 
the syntax ${length}Min needs a severe kick up the bum. You could concatenate it explicitly.

But yeah, CMUD should raise an error and not just hang.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
shalimar
GURU


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

PostPosted: Fri Jan 18, 2008 1:44 am   
 
That syntax is used in several others of my scripts without the lockup.

I am thinking it has something to do with the parameters of the #WHILE changing before the whole thing resolves, but seeing as how it should be rechecking said value at the end of each iteration, i'm not sure.

Unless the value it is checking is stored in memory and doesn't get recompiled with each iteration and its getting stuck in a loop checking for the longMin key over and over...

That would explain why it is getting stuck... but i would think hitting escape would break out of that, and it doesn't.
_________________
Discord: Shalimarwildcat
Reply with quote
kjaerhus
Magician


Joined: 18 Dec 2006
Posts: 317
Location: Denmark

PostPosted: Sun Jan 20, 2008 2:13 pm   
 
I have a problem with CMUD hanging forever too - may be related I don't know.

I have a statusbar that displays values of certain interesting variables like roundtime, current weapon, etc. The value of my statusbar is shown below:

Roundtime: @Capturing/Roundtime/roundtime Weapon: @Equipment/Weapons/weapon Armor: @Equipment/Armor/armorNames Tool: @Equipment/Tools/tool Mindstate: @Activities/Practice/activityMindstate

Because I am moving and changing scripts at the moment not all of these variables actually exists yet. Now, if I try to make a new variable with the same name as one of those nonexisting ones the statusbar is trying to refer to CMUD hangs - I cannot do anything but pressing ctrl+alt+delete and terminate the program. If I have an existing variable and try to rename it to one of the same nonexisting variables the program hangs too.

Now, although annoying this is easy to work around and it probably don't happen so often unless you move things in the "wrong order", but it's definitely a bug and should be fixed. I can't figure out if it's related to yours but maybe you can see a pattern?
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