 |
Jimmyjoe Newbie
Joined: 07 Apr 2005 Posts: 3
|
Posted: 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. |
|
|
|
 |
DeReP Adept
Joined: 14 Jun 2003 Posts: 222 Location: Chile
|
Posted: Thu Apr 07, 2005 8:13 pm |
#DBLOAD me
#VA NewMember ""
#ADDKEY NewMember {name="%1"|rank=1}
#NEW me @NewMember
#DBSAVE me |
|
|
|
 |
Jimmyjoe Newbie
Joined: 07 Apr 2005 Posts: 3
|
Posted: Fri Apr 08, 2005 3:09 am |
Still not working. I have no idea why. 
|
|
|
|
 |
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: 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
|
|
|
|
 |
Jimmyjoe Newbie
Joined: 07 Apr 2005 Posts: 3
|
Posted: 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. :)
|
|
|
|
 |
|
|
|