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
Kheri_
Wanderer


Joined: 11 Oct 2005
Posts: 58

PostPosted: Sun Apr 08, 2007 8:29 am   

psub sub, adding a variable to a line
 
jPattern: You are rewarded (*) experience points for your kill.



#math tnl @tnl-%1
#var XPkill %1
#math Kills_tnl @tnl/%1


What i want is: my kills tnl, next to the line @kills_tnl


You are rewarded 3643 experience points for your kill. (102)



I am having trouble with the variable and #psub
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Apr 08, 2007 2:40 pm   
 
You have two options:

1)use #PSUB %concat(". (",@kills_tnl,")") %x1 and put parentheses around the period.

2)use #SUBSTITUTE {You are rewarded %1 experience points for your kill. ~(@kills_tnl~)} and put parentheses around the experience number.

#2 will definitely work, but I'm not sure about #1 (#1 does not work in CMud).
_________________
EDIT: I didn't like my old signature
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