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


Joined: 13 Jan 2005
Posts: 3

PostPosted: Mon Jan 17, 2005 2:37 am   

What's Wrong With This?!?!?!
 
#TR {({@Groupmem})'s (%*) with (%x) (%w)!}
{
#MATH damage {%1.damage+%item( @DamVals, %ismember( "%3", @DamWords))}
#ADDKEY %1 damage @damage
#ADDITEM PlayerFighters "%1"
#COL 3
}

It's supposed to add the current damage + the damage they just dealt, but it's giving nothing out :(
_________________
Sir1l
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Jan 17, 2005 6:54 am   
 
%1.damage is undefined. You must use the variable symbol, @, to reference a variable.
%item returns the nth item of a stringlist. This is always a string, even when the string consists entirely of numeric characters. If a number is desired, it must be converted using %number.
The opening brace of the trigger value must be on the same line as the closing brace of its pattern.

#TR {({@Groupmem})'s (%*) with (%x) (%w)!} {
#MATH damage {@%1.damage + %number( %item( @DamVals, %ismember( "%3", @DamWords)))}
#ADDKEY %1 damage @damage
#ADDITEM PlayerFighters "%1"
#COL 3
}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
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