|
typhonjr Beginner
Joined: 12 Jul 2002 Posts: 11
|
Posted: 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 |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: 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 |
|
|
|
typhonjr Beginner
Joined: 12 Jul 2002 Posts: 11
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
|
|
|