TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Similar #sub

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
Azirek



Joined: 29 Jan 2012
Posts: 28

PostPosted: Sun Feb 19, 2012 3:01 am    Post subject: Similar #sub Reply with quote

Hi! I need help. I have two similar #sub

#sub {kanciasta rozgaleziona lodyge}{kanciasta rozgaleziona lodyge(bylica)}
#sub {czterokanciasta rozgaleziona lodyge}{czterokanciasta rozgaleziona lodyge(dziurawiec)}

But when mud output is:
Code:
czterokanciasta rozgaleziona lodyge

I see:
Code:
czterokanciasta rozgaleziona lodyge(bylica)(dziurawiec)


edit / re down:
Sorry I wrong wrote the post. In script is closed '}'.
This is problem with:

kanciasta rozgaleziona lodyge
czterokanciasta rozgaleziona lodyge

Still need help
_________________
GNU Linux Slackware Current, Tintin++ 2.00.7 and 2.00.9


Last edited by Azirek on Sun Feb 19, 2012 12:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
ixle



Joined: 15 Sep 2011
Posts: 158
Location: United States

PostPosted: Sun Feb 19, 2012 7:53 am    Post subject: Re: Similar #sub Reply with quote

Looks like you forgot to close the first #SUB statement (missing last '}')

Azirek wrote:
#sub {kanciasta rozgaleziona lodyge}{kanciasta rozgaleziona lodyge(bylica)


Try:

Code:
#sub {kanciasta rozgaleziona lodyge}{kanciasta rozgaleziona lodyge(bylica)}
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Feb 19, 2012 1:46 pm    Post subject: Reply with quote

Try using word boundaries:

Code:

#sub {\bkanciasta rozgaleziona lodyge\b} {%0(bylica)}
#sub {\bczterokanciasta rozgaleziona lodyge\b} {%0(dziurawiec)}
Back to top
View user's profile Send private message Send e-mail
Azirek



Joined: 29 Jan 2012
Posts: 28

PostPosted: Sun Feb 19, 2012 4:50 pm    Post subject: Reply with quote

Thank you Scandum. This works perfectly.
_________________
GNU Linux Slackware Current, Tintin++ 2.00.7 and 2.00.9
Back to top
View user's profile Send private message
Azirek



Joined: 29 Jan 2012
Posts: 28

PostPosted: Sat Apr 21, 2012 6:55 am    Post subject: Reply with quote

Please help. One more thing:

#sub {\bdobrze\b \bwywazony\b}{%0 10/14}
#sub {\bbardzo\b \bdobrze\b \bwywazony\b}{%0 11/14}

dobrze wywazony
bardzo dobrze wywazony

When mud output is:
Quote:
bardzo dobrze wywazony


I see:

Quote:
bardzo dobrze wywazony 10/14 11/14


I want:

Quote:
bardzo dobrze wywazony 11/14

_________________
GNU Linux Slackware Current, Tintin++ 2.00.7 and 2.00.9
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Apr 23, 2012 6:53 am    Post subject: Reply with quote

You could try:

Code:

#function {bardo}
{
  #if {"%0" == "bardo"}
  {
    #return 11/14
  };
  #else
  {
    #return 10/14
  }
}

#sub {\b{bardzo|} dobrze wywazony\b}{%0 @bardo{%1}}
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group