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


Joined: 19 Nov 2003
Posts: 16
Location: USA

PostPosted: Sun Jun 10, 2007 7:47 pm   

Capturing Information to a Database
 
I'm trying to capture all the information on each line and place them into a newly created database.

--------(Item)-------(Description)----------------------------(Stock)-(Price)-
letter143140: a crisp and official letter 1 50000gp
satchel46937: a sunny yellow hunter's satchel 1 700gp

I want to capture the first word, in this case, 'satchel', the number after the keyword(ItemType) '46937, ' the long description 'a sunny yellow hunter's satchel,' and stock amount, 1.

I have a database with fields of ItemType, Name, StockNumber, and StockAmount where I want to put the bolded above in each field, respectively.

I'm having problems with the trigger, specifically the trigger to capture the long description since it's a string list and separating satchel46937 into 2 separate database fields. Also, how to make that trigger create new records, and more importantly update the record in the future through the long description because that's the unique characteristic. Rummaging through past forums, I'm assuming creating a database record variable and using the #new command in the trigger.

Thanks.
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Sun Jun 10, 2007 8:45 pm   
 
#tr {(%w)(%d)~:%s(*)%s(%d)%s%d~gp} {#new ....}
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