|
Pr0fiT Beginner
Joined: 11 Jun 2002 Posts: 10 Location: USA
|
Posted: Tue Jun 11, 2002 8:21 am
Database Help |
Let's try posting this again, see if it goes through this time :)
Anyway, I have all my triggers up and running, everything captures to an item variable perfectly, heck, I even got the reset variable thing workin. I cannot get it to add to the database. If i try to add it to the database, it adds weird stuff, like name being shadow, usable by druid....there are no variables left over, and i reset the item variable after every id..so when i id a new item, it captures fine, but if i try to add to db, i get the name shadow druid usable stuff again, Please help! Anyway, here are the triggers I have to capture
#Trigger {Object Name: &Item.Name is &Item.Type and made of &Item.Material.} {} identify
#Trigger {Its weight is &Item.Weight, value is &Item.Value, rent cost &Item.Rentcost, and level is &Item.Level.} {} identify
#Trigger {Special Properties: &Item.Specprop.} {} identify
#Trigger {Extra Properties: &Item.Extraprop.} {} identify
#Trigger {Item has been repaired: &Item.Repair times and has existed for &Item.Age days} {} identify
#Trigger {Weapon type: &Item.Wtype.} {} identify
#Trigger {Item is: &Item.Rarity.} {} identify
#Trigger {It is &Item.Size in size.} {} identify
#Trigger {Usable by :&Item.Use.} {} identify
#Trigger {Armor class is &Item.AC.} {} Identify
#Trigger {Damage is &Item.Damage (average &Item.Avdamage).} {} identify
#Trigger {Affects hitroll by &Item.HR.} {} identify
#Trigger {Affects damroll by &Item.DR.} {} identify
#Trigger {Affects hp by &Item.HP.} {} identify
#Trigger {Affects svspell by &Item.SVS.} {} Identify
#Trigger {Affects svparalysis by &Item.Par.} {} Identify
#Trigger {Affects intelligence by &Item.Int.} {} Identify
#Trigger {Affects charisma by &Item.Cha.} {} Identify
#Trigger {Affects mana by &Item.Mana.} {} Identify
#Trigger {Affects strength by &Item.Str.} {} Identify
#Trigger {Affects wisdom by &Item.Wis.} {} Identify
#Trigger {Affects dexterity by &Item.Dex.} {} Identify
#Trigger {Affects constitution by &Item.Con.} {} Identify
#Trigger {Affects willpower by &Item.Wil.} {} Identify
#Trigger {Affects luck by &Item.Luck.} {} Identify
#Trigger {Affects svpoison by &Item.Poi.} {} Identify
#Trigger {Affects immune by &Item.Immune.} {} Identify
#Trigger {Affects resist by &Item.Resist.} {} Identify
#Trigger {&Item.DosAmnt doses of level &Item.DosLvl: &Item.DosSpell} {} Identify
#Trigger {Level &Item.PotionLevel spells of: &Item.PotionSpell} {} Identify
#Trigger {Has &Item.Charges charges of level &Item.Level '&Item.Spell'} {} Identify
#Trigger {Has &Item.Page pages remaining of level &Item.BookLevel '&Item.BookSpell'.} {} Identify
#Trigger {Level &Item.ScrollLevel spells of: &Item.ScrollSpell} {} Identify
#Trigger {Casts spell '&Item.WearSpell'} {} Identify
Pretty spiffy for a N00b3r2 eh :) anyway, i want it to add this to the db, and i want it to check to see if thie item already exists, and if it does exist, i dont want it added. how could i do this? I have tried doing this:
#alias adddb {#if (%null(%find(%db(@Item, Name)))) {#new All @Item}
that didnt work, what should I do?
Pr0fiT
www.phidar.com |
|
|
|
Pr0fiT Beginner
Joined: 11 Jun 2002 Posts: 10 Location: USA
|
Posted: Tue Jun 11, 2002 8:29 am |
UPDATE. I have found a small problem, which presents another one, heh, or something. This is what the output on the mud look slike:
Object Name: sheathes of magical energy is an armor and made of energy.
Its weight is 1, value is 1, rent cost 0, and level is 60.
Item is worn: take hands.
Special Properties: glow hum magic anti-evil anti-neutral.
Extra Properties: tweak update.
Item has been repaired: 0 times and has existed for 101 days.
Object can be worn at special layer.
Item is: unique.
It is medium in size.
Usable by :Cle Dru Ele.
Armor class is 0.
Item tweaks.
Affects hp by 55.
Affects mana by 55.
Now, heres the problem
See how some of the line that end with numbers have a period at the end. Well, in the trigger like:
#Trigger {Affects mana by &Item.mana.} {} Identify
It captures the amount of mana as 55. How can I make it not capture that period? I don't think that's the cause of all my problems, but it might be the reason why the hp and mana will not post since its not a real number with the . in it. Thanks.
Pr0fiT
www.phidar.com |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jun 11, 2002 11:36 am |
You need to limit it with braces. Example:
Affects mana by &Item.mana.
should be
Affects mana by &{Item.mana}.
On the problem about getting wrong info into the database, try creating some more items (after the first one goes in wrong) and see if it happens with all the others too. I had a similar problem before where the first item I entered in the database would be all wrong, but the second one would be all right.
Kjata |
|
|
|
dacheeba Adept
Joined: 29 Oct 2001 Posts: 250
|
Posted: Tue Jun 11, 2002 3:33 pm |
quote:
You need to limit it with braces. Example:
Affects mana by &Item.mana.
should be
Affects mana by &{Item.mana}.
On the problem about getting wrong info into the database, try creating some more items (after the first one goes in wrong) and see if it happens with all the others too. I had a similar problem before where the first item I entered in the database would be all wrong, but the second one would be all right.
Kjata
Yeah, I heard there was a problem with auto populating your DB . Something along the lines of if would mess up if you didnt do the first record manually. |
|
|
|
Pr0fiT Beginner
Joined: 11 Jun 2002 Posts: 10 Location: USA
|
Posted: Tue Jun 11, 2002 6:15 pm |
so it should be like;
#Trigger {Affects mana by &{Item.Mana}} {} Identify?
Pr0fiT
www.phidar.com |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Jun 11, 2002 7:01 pm |
No, you forgot the period. It should be:
#Trigger {Affects mana by &{Item.Mana}.} {} Identify
Kjata |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jun 11, 2002 7:03 pm |
To control the type of information you capture (numeric, for instance) use the appropriate wildcard.
Affects mana by &%d{Item.mana}.
LightBulb
Vague questions get vague answers |
|
|
|
Pr0fiT Beginner
Joined: 11 Jun 2002 Posts: 10 Location: USA
|
Posted: Tue Jun 11, 2002 11:18 pm |
OK, I am stuck once more. I have changed the triggers as suggested, just havent added the %w and %d stuff. Just two questions. %d is for numbers, so if it is going to be multiple words, can i use %w*
Also, I cannot create a new database. The templates dont show up, I just get Paramater out of range -1. Are there any files I can download that will just fix the database aspect, like the templates? I mean, I tried upgrading to 6.26 beta, didnt work, just got some memory address error thing when i clicked the db button 00000cf6 number something big long error, scared me, so i uninstalled completely, and downloaded 6.16 again, now i can open the stuff, i just cant load an existing database or see the templates. Im probably ranting because ive been trying to fix it for a few hours :) I am lost, whiiiiine.
I appreciate all the help you have been giving me though.
Pr0fiT
www.phidar.com |
|
|
|
Pr0fiT Beginner
Joined: 11 Jun 2002 Posts: 10 Location: USA
|
Posted: Tue Jun 11, 2002 11:37 pm |
UPDATE: Exact Error
Access violation at address 005FFC59 in module 'Zmud.exe". Read of address 00000000C.
That is what I get when I click the DB button in 6.16. Any clue how to fix it. I am also posting this in the beta forum.
Pr0fiT
www.phidar.com |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Jun 12, 2002 1:34 pm |
I really don't know about the error. Wait and see what answer you get in the beta forum. As for the trigger patterns, Like LightBulb said, you can put the type you want to match by putting the appropiate wildcard between the & and the {. For example, %d for numbers. If you want multiple words, just don't put anything since the default is *.
Kjata |
|
|
|
Pr0fiT Beginner
Joined: 11 Jun 2002 Posts: 10 Location: USA
|
Posted: Wed Jun 12, 2002 6:47 pm |
Hrm,w here do i sign up for the beta forum again?
Pr0fiT
www.phidar.com |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jun 12, 2002 6:56 pm |
Click on Forums at the top of this page. This will take you the main forum page. Find the Beta Forum and click on the Application Form link.
LightBulb
Vague questions get vague answers |
|
|
|
|
|