Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
guganslof
Beginner


Joined: 05 Apr 2008
Posts: 19

PostPosted: Sat Apr 05, 2008 3:32 pm   

#sub variables
 
Recently switched over from zmud to cmud and I haven't been able to get this trigger working and it's driving me nuts.



Offensive bonus: (%d), Dodging bonus: (%d), Parrying bonus: (%d)
#substitute {Offensive bonus: %1, Dodging bonus: %2, Parrying bonus: %3, Defense: (%2 + %3)}

Offensive bonus: 175, Dodging bonus: 88, Parrying bonus: 102, Defense: (88 + 102)

When it should become Defense: 200
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Sat Apr 05, 2008 3:46 pm   
 
%eval(%2+%3)
_________________
Discord: Shalimarwildcat
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sat Apr 05, 2008 3:58 pm   
 
CMUD is supposed to evaluate expressions inside parentheses, but that may not apply to certain cases, such as this one. Use of %eval should take care of it for you, but it may still be considered a minor sort of bug.

Also, 88 + 102 = 190. Wink
Reply with quote
guganslof
Beginner


Joined: 05 Apr 2008
Posts: 19

PostPosted: Sat Apr 05, 2008 4:10 pm   
 
Larkin wrote:
CMUD is supposed to evaluate expressions inside parentheses, but that may not apply to certain cases, such as this one. Use of %eval should take care of it for you, but it may still be considered a minor sort of bug.

Also, 88 + 102 = 190. Wink


obviously that's why i need the trigger to do it Embarassed


and thanks the %eval(%2+%3) fixed it right up!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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