Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Humpton
Apprentice


Joined: 10 Oct 2000
Posts: 158
Location: Chicago, IL

PostPosted: Sun Dec 29, 2002 5:53 pm   

#ALARM Issue
 
My issue has come from playing with DataBases for the very first time. Most of this code comes from the finished Scripts section.

Here is my code (repetative bits taken out for brevity). Note: Sorry about the formatting, how do I get the indents to stay?

#CLASS {EQGeneral}

#VAR EQNewEntry {}

#TR {(*) shows you (*):} {
#VAR Temp {%2}
EQCaptureStart
#T+ EQCapture
#ALARM +1 {
#T- EQCapture
EQCaptureFinish
}
}

#AL {EQCaptureStart} {
#VAR EQNewEntry {}
#IF (%left(@Temp,2)="a ") {
#VAR Temp %right(@Temp,2)
}
#IF (%left(@Temp,3)="an ") {
#VAR Temp %right(@Temp,3)
}
#ADDKEY EQNewEntry Name @Temp
}

#AL {EQCaptureFinish} {
#DBLOAD EQ
#IF !%null( %find( @EQNewEntry.Name, All, Name)) {
#YESNO {A duplicate item already exists, add anyway?} {#NOOP} {#ABORT 1}
}
#NEW All @EQNewEntry
#ECHO %ansi(high,red)***
#ECHO %ansi(high,yellow)New Record added to the EQ Database!
#ECHO %ansi(high,red)***
}

#CLASS {EQCapture}
#TR {Item type: (*)} {#CO 112;#ADDKEY EQNewEntry Type %1}
#TR {Charisma by (%d)} {#CO 118;#ADDKEY EQNewEntry Charisma %1}

#TR {Keywords: (*)} {#CO 112;#ADDKEY EQNewEntry Keywords %replace("%1"," ","|")}

#ST {DataBase Capturing: On} {EQCapture}

#CLASS 0

#T- EQCapture

Now, here's the problem.
When the #YESNO box comes up, if I delay in responding (and either yes or no does the same) every 1 second I get another #ALARM added to the execution stack. As soon as I click yes or no it stops adding to the stack, but there are multiple #YESNO boxes now in existence which I have to click through them all. If I'm quick to respond, then I don't get any.

My problem is I seem to have created a loop but don't see how, nor know how to stop it. Shouldn't the #YESNO box just sit there until I do something? Any ideas?

Make sense?

Of course this is all moot if an entry does not already exist as the #YESNO box doesn't come up.

Stay JOLLY!
H
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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