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


Joined: 20 Apr 2022
Posts: 4

PostPosted: Wed Apr 20, 2022 12:29 am   

Reading value from the line with ()
 
My full line is:
Gigantic 14 Force (46) - 19 [ ]

Trying to read that force value which is 46 in this case and display it to the screen.

When I trigger:
Gigantic 14 Force %1
#print %1
I get the result:
(46) - 19 [ ]

How to extract only "46" in this case without any other stuff? Thank you for help!
Reply with quote
chaossdragon
Apprentice


Joined: 09 Apr 2008
Posts: 168

PostPosted: Wed Apr 20, 2022 3:25 am   
 
#TR {Gigantic %n Force ~((%n)~) - %n ~[ ~]} {#PRINT %1}

should do the trick.
Reply with quote
Padarom
Newbie


Joined: 20 Apr 2022
Posts: 4

PostPosted: Sun May 15, 2022 3:42 pm   
 
Thank you very much chaosdragon! Worked like magic!
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