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
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Wed Jul 18, 2007 2:18 pm   

Large data record variables truncated on save/close/open
 
Seems that zMUD can build a data record internally of a much larger size than it can save when you close zMUD and then load again when you open it. If the data record gets too large, it works fine while you're logged in, but when you close down and come back, it's lost its values. Other than spreading the information over more variables, is there any workaround or way to avoid this?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Jul 18, 2007 9:00 pm   
 
You could use the database module itself.
_________________
EDIT: I didn't like my old signature
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Sun Jul 22, 2007 2:03 pm   
 
All these years and I've never actually learned how to use that, largely because I never found the right pages in the Help that explained it. I always found the command and function syntax pages which are completely not the right place to start. Your suggestion made me buckle down and search until I actually found the right pages to start from. This is something I should have done ages ago! It'll be a lot of rewriting but the result will be much faster and cleaner. Thanks for giving me the nudge I needed.

(I eventually found the intro to the database in the main index, but it was under "Getting Started" which really makes no sense as the database is not a getting started kind of functionality.)
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Mon Jul 23, 2007 1:06 am   
 
I ran into a very serious problem with this after a bit more development work. Apparently, I have to have the database window open to use %query. If it's closed, even if I use #dbload and #dbreset and #dboffline in any combination, %query(&ID > 2000) (or any other query) returns a null string. The exact same queries work fine when the window is open, resulting in a nice big stringlist of recordnumbers.

I have the same problem with %rec. With the window closed, #dbfirst;#show %rec.ID shows nothing. With the database window open, it shows the contents of the ID field of the first record. I assume all accesses to the database will fail with the window closed in the same way.

I can't expect my users to have that window open all the time -- in fact I'd rather they didn't open it at all, as they should be accessing this database through my scripts. How do I work around this, what am I missing?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Jul 23, 2007 12:29 pm   
 
The window must indeed be open in order to access it. There is hope however!

You can open the database using your scripts access the data within it and close it.

#MENU {Windows|Database}
Do stuff
#MENU {Database|File|Exit}

Also the database window need not be on top or full size. So you can tell them to make it small or to click the roll up button on it.

A problem you might have, I sometimes did at least. Is that sometimes my scripts would run too fast for the database to load.

If that happens you can open the database use the dbload command then call an alarm that processes your data and closes the database. Three seconds was always enough time and was frankly probably way more than enough for me if a delay was needed.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Mon Jul 23, 2007 12:52 pm   
 
I can see how I can force the window open, can I force it minimized from script control?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Jul 23, 2007 3:19 pm   
 
No, I'm sure Zugg knows a way but I don't.

Like I mentioned above. Have them manually open the db window, move it to the side, and click the roll-up button once then close it.

If they did not normally use the database otherwise that should be a permanent fix. If they DO normally use the database that shouldn't be too big a deal for them.

It would be a real nice improvement if when Zugg rewrites the database module for Cmud that it did not have to have a window open to do these things though.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
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