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


Joined: 26 Aug 2002
Posts: 17
Location: USA

PostPosted: Thu Apr 03, 2003 6:29 am   

DB problem with an equal sign
 
I'm running a data mining script that I wrote that works solely on the auction channel. Along with dozens of other pieces of information it gathers, it captures the "short description" of an item, i.e. how the item looks in your inventory.

Some of the items look like this:

-=- Dagger of l33tness -=-

My triggers store that in a variable called "shortdesc" and that works just fine, but when it tries to stuff that into the DB and the end of the script, I end up with a blank record in the DB.

The "shortdesc" field in the DB is type Text, and I'm running Zmud 6.4. Any thoughts?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Apr 03, 2003 7:18 am   
 
Use a record variable (see #ADDKEY). Also see the helpfile section Introduction to the Database, particularly the subsection Programming the Database and the topics Database Variables and Creating New Records.

LightBulb
Advanced Member
Reply with quote
kinson
Beginner


Joined: 26 Aug 2002
Posts: 17
Location: USA

PostPosted: Thu Apr 03, 2003 7:50 am   
 
My script already uses the #ADDKEY function. Here is that trigger:

Pattern:
^* is auctioning (*) ~(Level *, Num (*)~). Current bid is *.$

When the trigger sees the following line:
Player is auctioning (==A Certain Item==) (Level 1, Num 1). Current bid is 1.

It does:
#ADDKEY newrecord shortdesc "%1"
bid %2

and a few other things that aren't related to this problem.

Right after an item like that (with an equal sign in it) is auctioned, I can look at the "newrecord" record variable and see that the "shortdesc" field appears fine, just how it should. It would appear that the problem exists somewhere in the actual stuffing of the information into the DB.

Sorry I didn't go into it that far last time, my apologies :)

Any other thoughts?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Apr 03, 2003 12:17 pm   
 
Looking at the help for #ADDKEY it says you can do multiple fields at once with a syntax of #ADDKEY varname {field=value|field=value|...}. It possible that there is a bug in how zMud inteprets the = when using the other syntax. It seems that this bug has already been fixed for the next public version.
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