|
Silvayn Beginner
Joined: 11 May 2002 Posts: 13 Location: Slovakia
|
Posted: Wed May 15, 2002 7:07 pm
Accessing database |
I have problems with accessing my database (probably when i manually edit it). My triggers sometimes work and sometimes they don't. I new to database usage (started to play with it yesterday), so the solution will probably be easy.
Eg. one trigger waits for 'You wear (*)' pattern and tries to look up %1 in armour database. The trigger 'body' looks like this:
#IF (%find( %lower( %1), Armour)) {
#VAR tmp %find( %lower( %1), Armour)
#SUB { %proper( %1) %ansi( 10)worn on %db( @tmp, "Slots")}
}
A testing #ECHO %1 placed on the top prooves that the name is captured in the right way and that the trigger is fired, it just doens't always %find() it (same pattern). Any ideas? |
|
|
|
Silvayn Beginner
Joined: 11 May 2002 Posts: 13 Location: Slovakia
|
Posted: Wed May 15, 2002 9:00 pm |
I've figured that the trigger and query works only when the Database window is opened and the database displayed. As soon as I close it, the trigger will stop to work. I've put #DBLOAD Armour and #DBRESET but it still won't work when I close the window. So how do I solve it?
Hmm, or is it because I'm offline? I'm troubleshooting the triggers using #SHOW command. |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Thu May 16, 2002 1:43 am |
No, you need the database window open to access it by script. This is so that zMUd won't load into memory stuff that isn't being used. You can however dock the database window somewhere where it won't bother you, like making it appear as a tab in the main window.
Kjata |
|
|
|
Silvayn Beginner
Joined: 11 May 2002 Posts: 13 Location: Slovakia
|
Posted: Thu May 16, 2002 10:06 am |
I see... thanks for clearing it up for me :)
|
|
|
|
|
|