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
mmex
Newbie


Joined: 12 Nov 2003
Posts: 2
Location: USA

PostPosted: Wed Nov 12, 2003 3:25 pm   

Databases?
 
I am having trouble using the built in database features of zmud. I am trying to use a simple database to keep track of information from a mud for me. I have triggers, aliases, etc that all seem to work correctly as long as I have the database window open with a database loaded. If I close the database window everything stops working. It would be really nice if the scripts would automatically open the right database so I wouldn't have to do it manually each time I start zMud.

A basic script is as follows:

#DBLOAD @DB
#QUERY (&name=%1) @DB 1
#IF (&name <> %1) {#NEW @DB {name=%1|val=1}} {
#DBPUT val %eval( &val+1)
}
#SHOW &name = &val
#DBSAVE @DB

The database name is "stats" and the file is "stats.dbd". No matter what value I set DB to it only seems to work when I have the database open in the database window. Is there a way to get around this?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Nov 12, 2003 7:30 pm   
 
The database module is only loaded into memory when the database window is open. SOOOO, you have to have the database window open and there's no way to get around it.

You don't actually need to close the database window. If you leave it open, your database(s) will be saved when you close the character and will reopen automatically the next time you open the character. Furthermore, zMUD allows multiple databases so there's no need to close one before opening another. The window can easily be minimized or placed behind other windows when you don't want to see it.
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