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


Joined: 17 Oct 2002
Posts: 26
Location: USA

PostPosted: Mon Nov 04, 2002 3:57 am   

Inserting Multiple lines to a 'Memo' field in DB
 
Anyone know how to insert multiple lines into a 'memo' type field for a database? This is what I get when I id something:



Item: 'wind dagger'
Weight: 4 Typical cost: 2932 Level: 20 (very uncommon)
Type: WEAPON Composition: NONE Requires 16 strength to wield.
Dieroll: 5d3 stab Weapon speed: normal
Item has effects as:
Affects: HITROLL by 3
Affects: DAMROLL by 3
Affects: DEX by 1
Affects: STR by -2


How would I capture all the 'Affects' into the same field (field name is 'affects') that I have set up as a 'memo' type (as opposed to 'text')?

Thanks,
MadBomber
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Nov 04, 2002 7:33 am   
 
You might be able to do this with %cr, but I wouldn't count on it. On the other hand, it's fairly easy to use a single line of text:
HITROLL by 3 -- DAMROLL by 3 -- DEX by 1 -- STR by -2

#TR {Affects: (*)} {#IF (%iskey(@db, affects)) {#ADDKEY db affects {%db(@db, affects) -- %1}} {#ADDKEY db affects {%1}}}
This requires that you clear the variable, or at least the key, at the beginning of the id.

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