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
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Thu Jun 11, 2009 3:21 am   

[3.08] Stack frame corruption
 
Code:
$affdb={bellwort="overwhelming-pride|pacifism|peace|justice|generosity|lovers-effect"|hawthorn=deafness|kelp="baldness|clumsiness|weariness|asthma|sensitivity|hypochondria|blood-poisoning|limp-veins"|lobelia="fear-of-commitment|recklessness|masochism|agoraphobia|loneliness|vertigo|claustrophobia|berserking"|bayberry=blindness|ash="sadness|dementia|hallucinations|confusion|paranoia|hypersomnia|hatred|blood-curse"|ginseng="haemophilia|sunlight-allergy|lethargy|vomiting|thin-blood|addiction"|goldenseal="self-pity|stupidity|dizziness|shyness|epilepsy|impatience|dissonance"|bloodroot="paralysis|earthrot|heartflutter"}

$herbcures={asthma=kelp|impatience=goldenseal|dizziness=goldenseal|masochism=lobelia|dementia=ash|generosity=bellwort|fear-of-commitment=lobelia|shyness=goldenseal|vomiting=ginseng|stupidity=goldenseal|addiction=ginseng|sadness=ash|confusion=ash|justice=bellwort|heartflutter=bloodroot|self-pity=goldenseal|hallucinations=ash|peace=bellwort|vertigo=lobelia|haemophilia=ginseng|limp-veins=kelp|earthrot=bloodroot|epilepsy=goldenseal|sunlight-allergy=ginseng|baldness=kelp|weariness=kelp|blood-poisoning=kelp|paralysis=bloodroot|agoraphobia=lobelia|blood-curse=ash|claustrophobia=lobelia|clumsiness=kelp|pacifism=bellwort|thin-blood=ginseng|hatred=ash|overwhelming-pride=bellwort|loneliness=lobelia|lethargy=ginseng|dissonance=goldenseal|hypochondria=kelp|sensitivity=kelp|paranoia=ash|berserking=lobelia|hypersomnia=ash|recklessness=lobelia|lovers-effect=bellwort}

#local $cc $ac
$cc=$herbcures.$a
#FORALL $affdb.$cc {#IF (%ismember(%i, $caffs)) {
  $ac=%i
  #IF ($ac="weariness" && $cc="kelp" && $a="asthma") {focus;$ac=break}
  cure %i;#BREAK
  }}
#return $ac

That is the contents of function "cure" with parameters: "$a,$caffs"

It was working smoothly until I added this line:
#IF ($ac="weariness" && $cc="kelp" && $a="asthma") {focus;$ac=break}

At the command line
#SH @cure(asthma,asthma|weariness)

Causes an error window to show:

Exclamation Error parsing command
Stack frame corrupted (2)
#SH @cure(asthma,asthma|weariness)

I can't work out why, can anyone else see what the issue is?
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Thu Jun 11, 2009 6:15 am   
 
Update:
The command "focus" in the above script is actually an oninput trigger.
I no longer needed to be one, so I changed it to an alias, keeping the
exact same commands inside it, and I now not longer get the error.

Could this be a bug?
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Jun 11, 2009 8:55 pm   
 
Possibly. I'd need the script for the "focus" oninput trigger to reproduce the problem. Remember that you need to provide *all* of the scripts used in your example for the rest of us to try and reproduce the error here.

In general, I don't see a reason for "focus" to be an oninput trigger instead of an alias though. Oninput triggers should only be used in unusual situations where you need to parse the command line for something complicated. For something simple, aliases are much more efficient.
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