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
Ruderion
Novice


Joined: 12 Jan 2003
Posts: 33
Location: Netherlands

PostPosted: Tue Apr 08, 2003 12:13 am   

problem with capturing text to database
 
i want to add some items to an equipment datebase. On most items everything works fine but some have very strangs names in them and nothing is recorded.
item example:
Name : a shadowy -=+)> neckchain

I made a trigger on 'Name :' containing this code:
#addkey Item Name %quote( %1)
#NEW all @Item

i left out the triggers that capture other stuff for the item. What do i have to change to make this work?

Rudi van de Wetering
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Apr 08, 2003 12:47 am   
 
This trigger appears to work, at least with the example given.
#TR {Name : (*)} {#ADDK Item Name {%1};#NEW All @Item}
NOTE: Adjust spacing

LightBulb
Advanced Member
Reply with quote
Ruderion
Novice


Joined: 12 Jan 2003
Posts: 33
Location: Netherlands

PostPosted: Wed Apr 09, 2003 12:15 am   
 
I tried that trigger on its own but it doesn't work for me. All it does is insert an empty database record without any data in it.
Im useing version 6.26a might that have something to do with it?

Rudi van de Wetering
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Apr 09, 2003 2:01 am   
 
Try creating the first record of the database yourself and then letting the trigger create the rest.

Kjata
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Apr 09, 2003 3:33 am   
 
I tested it using version 6.40. I only used the #ADDKEY command in the trigger value, since I didn't have a database open. It correctly created a record variable, @Item, with one entry. The entry's key was Name and it's value was a shadowy -=+)> neckchain, as expected.

It's possible that the special characters interfere with the #NEW command as well as the #VAR command. If so, you'll probably have to resign yourself to entering these types of items manually.

LightBulb
Advanced Member
Reply with quote
Ruderion
Novice


Joined: 12 Jan 2003
Posts: 33
Location: Netherlands

PostPosted: Thu Apr 10, 2003 12:40 am   
 
you are rigth, the variable does contain the correct values. It's just a matter of entering them in the database with the NEW command. If there's no easy sollution i'll just enter them manually, there aren't that many of those items anyway.

Rudi van de Wetering
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