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


Joined: 12 Jul 2002
Posts: 11

PostPosted: Fri Jul 19, 2002 5:46 am   

an item db.
 
ok im just trying to set up a real simple db with like 3 fields. item name item type and general info. the first 2 are pretty self explanitory :-p but for general info i jsut want to include the entire selection from when i cast identify on the item.. i seem to be having some trouble capturing multipule lines of text and storing it in the db. ive tried to use capture to capture every line up until i hit the prompt again but it tends to capture my prompt as well. anyone have any ideas? oh heres what id looks like including my prompt so you can take a look. thanks

_-13739/13739hp 2978/3858mp 3007mv E.NSD S 12AM QNow -1000 2758G 193s-_ c id staff
Object 'the psionicist's staff' is type weapon, extra flags hum invis donated.
Weight is 2, value is 13750, level is 99.
Weapon type is spear/staff.
Damage is 10d10 (average 55).
Weapons flags: frost vampiric
Affects mana by 100.
Affects damage roll by 10.
Affects hit roll by 10.

_-13739/13739hp 2928/3858mp 3007mv E.NSD S 12AM QNow -1000 2758G 193s-_

thanks again

typhon jr.
-----------
lod.dynip.com port 4k
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri Jul 19, 2002 12:16 pm   
 
Use the blank line instead of the prompt:
#ALIAS id {c id %-1;#VAR general "";#T+ getId}
#TRIGGER {$} {#VAR general %leftback(@general, 1);#T- getId} "getId"
#TRIGGER {(*)} {#VAR general %concat(@general, "%1", %cr)} "getId"

Also, be sure that the field in the database where you are going to enter this is a Memo field.

Kjata
Reply with quote
typhonjr
Beginner


Joined: 12 Jul 2002
Posts: 11

PostPosted: Sat Jul 20, 2002 1:13 am   
 
ok that works better then what i was trying :-p now it seems i have one more problem.. usingin an example from another item db script im trying to use #ADDKEY and it doesnt seem to be working... my db is called 'eq' and it has the fields name, type, and stats.
#Addkey eq name @item
#Addkey eq type @type
#Addkey eq stats @general
dont seem to be working.. am i doing somethign wrong here?


typhon jr.
-----------
lod.dynip.com port 4k
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Jul 20, 2002 3:09 pm   
 
Since the first field in your #ADDKEY is non-numeric, it's the name of a database-variable, @eq, not the name of the database eq. You can use the #NEW command to add the information in the variable to the database.
#NEW all {@eq}
Also, when you use variables in your commands it's a good idea to enclose them in braces {}. This prevents them from being used to fill more than one field when they contain multiple words.
#Addkey eq name {@item}

LightBulb
Senior Member
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