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
MadBomber
Beginner


Joined: 17 Oct 2002
Posts: 26
Location: USA

PostPosted: Mon Nov 04, 2002 11:04 am   

Hmm...DB doesn't want to add data
 
Ok. I know I'm close to getting all this. This is my MUD output for an identify:
Item: 'wind dagger'

Weight: 4 Typical cost: 2867 Level: 20 (very uncommon)
Type: WEAPON Composition: NONE Requires 16 strength to wield.
Dieroll: 5d3 stab Weapon speed: normal
Item has effects as:
Affects: HITROLL by 3
Affects: DAMROLL by 3
Affects: DEX by 1
Affects: STR by -2
Here is a list of triggers I have to accomodate all this and more (in case I were to id armor) The first two are not in the same class folder as the others:
#ONINPUT {c ident %w} {#T+ ItemDB;#CLASS ItemDB}

#TRIGGER {^This item is being sold by *.} {#T+ ItemDB;#CLASS ItemDB}

#TRIGGER {Ac-apply: (%d)} {eq.ac_apply = %1}
#TRIGGER {Affects: (*)} {eq.affects = {%if( @eq.affects=%null, %1, @eq.affects -- %1)}}
#TRIGGER {Composition: (%x)} {eq.composition = %1}
#TRIGGER {Dieroll: (%a) (%w)} {eq.dieroll = %1;eq.damage_type = %2}
#TRIGGER {Item: '(*)'} {#VAR eq %null;eq.item = %1;#TEMP add2db {^$} {#NEW All @eq;#CLASS 0;#T- ItemDB;#T- add2db}}
#TRIGGER {Level: (%d)} {eq.level = %1}
#TRIGGER {Object is: (*)} {eq.object_is = %1}
#TRIGGER {Requires (%d) strength to wield} {eq.req_str = %1}
#TRIGGER {Total levels: (%d)} {eq.total_levels = %1}
#TRIGGER {Type: (%x)} {eq.type = %1}
#TRIGGER {Typical cost: (%d)} {eq.typical_cost = %1}
#TRIGGER {Weapon speed: (%w)} {eq.weapon_speed = %1}
#TRIGGER {Wear locations are: (*)} {eq.wear_location = %1}
#TRIGGER {Weight: (%d)} {eq.weight = %1}
#TRIGGER {{(}(*){)}} {eq.commonality = %1}
When I look at the variable eq that was created, it HAS taken all data *correctly*. But, when I look into my database, it has inserted part of the 'eq.item' into my 'name' field (which I insert manually since my mud doesnt list the name, but keywords after you do an ID), a partial insertion into the 'Item' field and absolutely NOTHING more. What did I do wrong? I am assuming it is in the following line, if so:
#TRIGGER {Item: '(*)'} {#VAR eq %null;eq.item = %1;#TEMP add2db {^$} {#NEW All @eq;#CLASS 0;#T- ItemDB;#T- add2db}}
Any ideas??

Thanks,
MadBomber
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Nov 04, 2002 1:20 pm   
 
Try adding the first record of the database manually and then let the script add others.

Kjata
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