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


Joined: 28 May 2003
Posts: 21
Location: USA

PostPosted: Wed May 28, 2003 8:53 am   

the database load command doesn't work for me
 
I try #DBLOAD and even #DBONLINE.. but I can never use a database file during a session until I load it through the DB button.. this is frustrating to me, as I am making an autojunk/autosac and using a database to store all of the eq that gets junked.

can anyone help me? so far zmud's database module seems very buggy.
Reply with quote
kord
Newbie


Joined: 25 May 2003
Posts: 5
Location: USA

PostPosted: Wed May 28, 2003 9:33 am   
 
I'd love to hear an answer to this one. I'm using databases for a number of things (brew lists, character list, equipment list for antiscrap triggers), and it's quite annoying to have to leave a DB window open to access databases. Any chance of an update to fix this, if we can't figure out how to get around it?

-Ryan

"A plan is just a list of things that don't happen."

--Parker, _Way of the Gun_
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed May 28, 2003 1:04 pm   
 
It's not a bug, it's intended. The DB window must be open in order for the database command and functions to work. If it is not open, the DB module is not loaded into memory and thus you can't script it. This is done to conserve memory.

If the widnow bothers you, just minimize it or dock it in a tabbed fashion to your main window and save the layout. From then on, whenever you open your character, the DB window should also open automatically.

Kjata
Reply with quote
tacturnal
Beginner


Joined: 28 May 2003
Posts: 21
Location: USA

PostPosted: Wed May 28, 2003 4:22 pm   
 
is there a way to open and minimize the database module automatically? I'm writing a script for other people to use.. and I want them to be able to view the autojunk list.. add to it, or remove from it.. I don't want them to have to click DB then minimize just to use a simple feature of the script. Is there anyway I can maintain a list without using the DB? The problem with array is that it won't let me delete items from the array by number.. therefore if I have two items that use the same alias (like bronze), but have different descriptions, and they're in different parts of the list.. my list is going to get thrown off when it removes the first bronze it sees as an alias, but then the descriptor won't come until the 5th bronze, completely throwwing the list out of whack.

--James
Reply with quote
tacturnal
Beginner


Joined: 28 May 2003
Posts: 21
Location: USA

PostPosted: Wed May 28, 2003 5:14 pm   
 
and it's a feature instead of a bug, that you can't load the database module in the background by a command from zmud?
I can totally see conserving resources.. but there is no option to turn the database on from the command line? How are you supposed to store script related data in a database? Click DB everytime?
How else can I keep a list of pair of data?

I appreciate any help, thanks

--James
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed May 28, 2003 5:51 pm   
 
I have no difficulty using #DBLOAD.

Lists can be maintained without the database using #ADDITEM, #DELITEM, %additem, %delitem.

You can keep a "list of pair of data" using a record-variable, with #ADDKEY, #DELKEY, %addkey, %delkey, etc.

And as you could probably tell, Kjata's answer was a response to the question immediately before it. #DBLOAD provides a method for loading the database module from a script.

I'm never very optimistic about people who plan on writing scripts for other people to use, but have to start by asking basic questions that show limited experience and understanding of the client. You might do better to just focus on writing scripts for yourself for awhile.

LightBulb
Advanced Member
Reply with quote
tacturnal
Beginner


Joined: 28 May 2003
Posts: 21
Location: USA

PostPosted: Wed May 28, 2003 6:03 pm   
 
actually, my script is awesome.. I figured out that I can additem and delitem in pairs easily by using <value1>|<value2> and since it's an array it runs very smoothly/quickly
however I'd like to know how many chars a list will hold.

if you were to login to the mud I play, and load my script, I bet you might just crap yourself.. (=

(I'm about to start working on a newbie walkthrough script option.. if newbie=1 etc etc)
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu May 29, 2003 12:50 pm   
 
#DBLOAD should work fine to open a database, but the DB window must already be open. I also provided some ways to have the window always open and out of the way each time you open your character.

There is also a way to open it by code:
#MENU {Windows|Database}

However, there is no way to minimize it by code. Anyway, people shouldn't need to open it every time they want to use the script. If the first time they want to use it, they open the DB window and dock it the way they want it, it will open again every time they open their characters.

Kjata
Reply with quote
tacturnal
Beginner


Joined: 28 May 2003
Posts: 21
Location: USA

PostPosted: Thu May 29, 2003 5:33 pm   
 
well I wasn't using the database so that they could enter data and look at it.. like a person would with an eq database.. I was using it to enter/store the data the is used by the autojunk and autodonate ruitine.. but I am using an array now, and probably should have been from the beginning, as it's faster.. I do wish zmud had more list functions.. like delitem would be nicer if you could choose an item number from the list.. like #delitem (4,@list) would delete the fourth record.. that or if it's only going to allow strings, if you could do something like %delitem(%d" gold coins",@gotitems) so that my gotitems array only has got items and not gold coins in it..
if there is a way to do something like that please let me know, I'd appreciate it :) (although I guess it doesn't matter it the gold coins are part of got items.. neither my junklist or donate list has gold coins listed.. I just wanted to take them out to avoid any problems)
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Thu May 29, 2003 5:47 pm   
 
Check out #DELNITEM.

Kjata
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