|
coler1975 Newbie
Joined: 28 Jul 2004 Posts: 3
|
Posted: Wed Jul 28, 2004 7:17 pm
Script help |
I'm working on a script to capture what's been identified and save it to a database. However, I'm having a problem. My scripts are not updating to my database, although they save correctly as variables. I've posted my scripts here:
#TRIGGER {Object &Item.Name} {}
#TRIGGER {Type: &Item.Type}{}
#TRIGGER {Item is: &Item.Class} {}
#TRIGGER {Worn by: &Item.Race} {}
#TRIGGER {Weight: &Item.Weight} {}
#TRIGGER {Value: &Item.Value} {}
#TRIGGER {AC Apply is &Item.ACApply } {}
#TRIGGER {Resistance to damage is &Item.Resistance} {}
#TRIGGER {HITROLL By &Item.Hit} {}
#TRIGGER {DAMROLL By &Item.Damage} {}
#TRIGGER {HIT -N- DAM By &Item.Damage &Item.Hit} {}
#TRIGGER {MOVE By &Item.Move} {}
#TRIGGER {HIT_POINTS By &Item.HP} {}
#TRIGGER {WIS By &Item.WIS} {}
#TRIGGER {INT By &Item.INT} {}
#TRIGGER {DEX By &Item.DEX} {}
#TRIGGER {STR By &Item.STR} {}
#TRIGGER {CON By &Item.CON} {}
#TRIGGER {MANA By &Item.MANA} {}
#TRIGGER {DAMAGED By &Item.DAMAGED} {}
#TRIGGER {ARMOR By &Item.ARMOR} {}
#TRIGGER {$} {#T- identify;#IF (!%null(@NewItem)) {#NEW @ItemType @Item}} identify
If someone could help me find my error, that'd be great! |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Wed Jul 28, 2004 8:44 pm |
If all you've got in your scripts is what is posted there, then there's a couple of empty variables in your final trigger. Either @Itemtype or @NewItem or possibly both are empty.
Change the last trigger to:
#trigger {$} {#T- identify;#if (!%null(@Item)) {#new @item.type @item};#var Item %null} identify
Also, a trigger you posted was missing a space:
#TRIGGER {Type: &Item.Type} {} |
|
|
|
coler1975 Newbie
Joined: 28 Jul 2004 Posts: 3
|
Posted: Thu Jul 29, 2004 6:15 am |
Cool, works great now, thanks a lot!
|
|
|
|
|
|