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
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Mon Sep 16, 2019 6:33 pm   

issue with capture
 
( 33%)
or 0-100%
or at 100% there is no space (100%)

how do i remove the space in the variable that captures from the capture?

%replace?
or %copy?

~((*)~%~)%sPower
jedi.cellp=%1

(99%) Power is the original capture...

the issue im having is the variage is capturing the blank space, and i need to know how to remove it.. with 0-99% at 100% it fills correctly and captures in the variable
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Mon Sep 16, 2019 7:27 pm   
 
jedi.cellp=%trimleft(%1) fixed it

however it doesn't fix other instances of the same thing...

ie: how to capture it correctly, i used a wildcard which is the worst way possible to capture it, i can't use %trimleft on the capture or i would... is there a better way to write the trigger capture?
Reply with quote
shalimar
GURU


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

PostPosted: Tue Sep 17, 2019 2:03 pm   
 
~({%s|}(%d)%~)
_________________
Discord: Shalimarwildcat
Reply with quote
chris123zugg
Apprentice


Joined: 23 Aug 2013
Posts: 175

PostPosted: Tue Sep 17, 2019 7:01 pm   
 
so bracketing the whitespace will capture with or without the whitespace?
Reply with quote
shalimar
GURU


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

PostPosted: Wed Sep 18, 2019 6:09 am   
 
i turned it into an annoynymous variable with two members, any amount of whitespace, or nothing at all. {%s|}
_________________
Discord: Shalimarwildcat
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