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
Silvayn
Beginner


Joined: 11 May 2002
Posts: 13
Location: Slovakia

PostPosted: Wed May 15, 2002 7:07 pm   

Accessing database
 
I have problems with accessing my database (probably when i manually edit it). My triggers sometimes work and sometimes they don't. I new to database usage (started to play with it yesterday), so the solution will probably be easy.

Eg. one trigger waits for 'You wear (*)' pattern and tries to look up %1 in armour database. The trigger 'body' looks like this:

#IF (%find( %lower( %1), Armour)) {
#VAR tmp %find( %lower( %1), Armour)
#SUB { %proper( %1) %ansi( 10)worn on %db( @tmp, "Slots")}
}

A testing #ECHO %1 placed on the top prooves that the name is captured in the right way and that the trigger is fired, it just doens't always %find() it (same pattern). Any ideas?
Reply with quote
Silvayn
Beginner


Joined: 11 May 2002
Posts: 13
Location: Slovakia

PostPosted: Wed May 15, 2002 9:00 pm   
 
I've figured that the trigger and query works only when the Database window is opened and the database displayed. As soon as I close it, the trigger will stop to work. I've put #DBLOAD Armour and #DBRESET but it still won't work when I close the window. So how do I solve it?

Hmm, or is it because I'm offline? I'm troubleshooting the triggers using #SHOW command.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu May 16, 2002 1:43 am   
 
No, you need the database window open to access it by script. This is so that zMUd won't load into memory stuff that isn't being used. You can however dock the database window somewhere where it won't bother you, like making it appear as a tab in the main window.

Kjata
Reply with quote
Silvayn
Beginner


Joined: 11 May 2002
Posts: 13
Location: Slovakia

PostPosted: Thu May 16, 2002 10:06 am   
 
I see... thanks for clearing it up for me :)
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