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
Jimmyjoe
Newbie


Joined: 07 Apr 2005
Posts: 3

PostPosted: Thu Apr 07, 2005 3:27 am   

Need help with a simple DB script
 
I'm kind-of a beginner with Zmud and was trying to create a member database for a guild on a game I play.

I created a database called members.db and gave it 2 fields:
'name' (text field)
'rank' (number field, minimum: 0, maximum: 5)

I then created the following trigger:
pattern:
^{([ }(*) whispers, "join" to you.{ ]}$

commands:
#dbload {me}
#va NewMember ""
#addkey NewMember {name="%1"|rank=1}
#new All @NewMember
#dbsave

I need to expand it, but I started with that, intending to further it as I figured out how stuff worked, but I'm stuck. The NewMember variable is properly defined when the pattern is matched, but nothing gets put into the DB. I'm probably making some extremely simple mistake, but any help would be greatly appreciated. Thanks.
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Thu Apr 07, 2005 8:13 pm   
 
#DBLOAD me
#VA NewMember ""
#ADDKEY NewMember {name="%1"|rank=1}
#NEW me @NewMember
#DBSAVE me
Reply with quote
Jimmyjoe
Newbie


Joined: 07 Apr 2005
Posts: 3

PostPosted: Fri Apr 08, 2005 3:09 am   
 
Still not working. I have no idea why. Sad
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Fri Apr 08, 2005 10:00 am   
 
For the database to work the database window needs to be open. I have written a small tutorial which you might find useful. zMUD Database Tutorial
Reply with quote
Jimmyjoe
Newbie


Joined: 07 Apr 2005
Posts: 3

PostPosted: Sat Apr 09, 2005 3:00 am   
 
Wow, I don't think it mentions that anywhere in the help files.. Anyway, it works. I knew it'd be something stupid like that. Thanks a ton, and great tutorial too, by the way. :)
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