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


Joined: 28 Jul 2004
Posts: 3

PostPosted: 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!
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: 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} {}
Reply with quote
coler1975
Newbie


Joined: 28 Jul 2004
Posts: 3

PostPosted: Thu Jul 29, 2004 6:15 am   
 
Cool, works great now, thanks a lot! Very Happy
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