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

#if {"$variable"==

 
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 Dec 02, 2012 2:49 pm    Post subject: #if {"$variable"== Reply with quote

Code:

#action {Ktos mowi: %1.}{
   #var {powiedzial}{%1};   
   #if {"$powiedzial" == "czesc"|"siema"}{#echo {Przywital sie}{#echo {Nie przywital}}}
}

I have a problem. This script only works when variable $powiedzial = czesc. Why when variable $powiedzial = siema doesn't work?
_________________
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: Sun Dec 02, 2012 4:05 pm    Post subject: Reply with quote

Try:

#if {"$powiedzial" == "{czesc|siema}"}
Back to top
View user's profile Send private message Send e-mail
Azirek



Joined: 29 Jan 2012
Posts: 28

PostPosted: Mon Dec 03, 2012 3:59 am    Post subject: Reply with quote

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



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Mon Dec 03, 2012 8:06 am    Post subject: Reply with quote

Ah, a thanks from me as well, I've been ORing the whole "$variable"=="value" in the past, but moving the OR into the RValue is much neater and compact! Big Smile
Back to top
View user's profile Send private message
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