Home
About
Download
Register
News
Help
Register
Log In
Forums
Scripts & Popups
Help with an IF statement
Forums
Active Threads
Search
Who's Online
Help
Print Thread
Help with an IF statement
#
195771
02/03/08
02:17 AM
Joined:
Oct 2007
Posts: 214
B
Buggs2008
OP
Fjord artisan
OP
Buggs2008
Fjord artisan
B
Joined:
Oct 2007
Posts: 214
I am familiar with the IF statement but having to go through a list, like this I dont think would be the best way to do it, any advice?
elseif ($5 == LANGUAGE) {
var %l = $4-
if ($4 == EN) %l = English
if ($4 == NL) %l = Dutch
if ($4 == JA) %l = Japanese
if ($4 == DE) %l = German
if ($4 == AR) %l = Arabic
if ($4 == FR) %l = French
if ($4 == ES) %l = Spanish
echo $2 11• Language11: %lang
}
Copy Link to Clipboard
Re: Help with an IF statement
Buggs2008
#
195772
02/03/08
02:28 AM
Joined:
Jul 2006
Posts: 4,212
France
W
Wims
Hoopy frood
Wims
Hoopy frood
W
Joined:
Jul 2006
Posts: 4,212
France
use $replace :
Code:
var %l = $replace($4-,EN,English,NL,Dutch,JA,Japanese,DE,German,AR,Arabic,FR,French,ES,Spanish)
#mircscripting @
irc.swiftirc.net
== the best mIRC help channel
Copy Link to Clipboard
Re: Help with an IF statement
Wims
#
195773
02/03/08
02:52 AM
Joined:
Dec 2002
Posts: 2,033
R
RoCk
Hoopy frood
RoCk
Hoopy frood
R
Joined:
Dec 2002
Posts: 2,033
Fr
en
ch is going to come out as FrEnglishch
Japan
es
e is going to come out as JapanSpanishe
Copy Link to Clipboard
Re: Help with an IF statement
RoCk
#
195775
02/03/08
03:08 AM
Joined:
Oct 2003
Posts: 3,918
Montreal, QC, Canada
A
argv0
Hoopy frood
argv0
Hoopy frood
A
Joined:
Oct 2003
Posts: 3,918
Montreal, QC, Canada
What you've never heard of FrEnglishch?
- argv[0] on EFnet #mIRC
- "
Life is a pointer to an integer without a cast
"
Copy Link to Clipboard
Re: Help with an IF statement
argv0
#
195777
02/03/08
05:57 AM
Joined:
Dec 2002
Posts: 2,033
R
RoCk
Hoopy frood
RoCk
Hoopy frood
R
Joined:
Dec 2002
Posts: 2,033
It's my 2nd language after Typonese.
Copy Link to Clipboard
Re: Help with an IF statement
RoCk
#
195778
02/03/08
07:25 AM
Joined:
Jun 2007
Posts: 933
5
5618
Hoopy frood
5618
Hoopy frood
5
Joined:
Jun 2007
Posts: 933
lol
Well, you can always use $replacecs() for a case-sensitive replacement.
Copy Link to Clipboard
Re: Help with an IF statement
Wims
#
195779
02/03/08
08:26 AM
Joined:
Oct 2005
Posts: 1,741
G
genius_at_work
Hoopy frood
genius_at_work
Hoopy frood
G
Joined:
Oct 2005
Posts: 1,741
Use $replacex instead.
"Replaces any occurrence of substring in string with newstring except for replacements that have already been made"
-genius_at_work
Copy Link to Clipboard
Re: Help with an IF statement
RoCk
#
195802
02/03/08
04:21 PM
Joined:
Jul 2006
Posts: 4,212
France
W
Wims
Hoopy frood
Wims
Hoopy frood
W
Joined:
Jul 2006
Posts: 4,212
France
Yes i'm aware about that, i just don't look at the words carefuly when i wrote my post, sorry :].
As mentioned, $replacex should be used
#mircscripting @
irc.swiftirc.net
== the best mIRC help channel
Copy Link to Clipboard
Hop To
News and Discussions ------
Latest News
General Discussion
Support ------
mIRC Help
Connection Issues
Scripts & Popups
Development ------
Feature Suggestions
Developers
Bug Reports
Print Thread
Switch to Threaded Mode
Show Likes
Link Copied to Clipboard
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Website
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
View Profile
Private Message
Follow User
Forum Posts
Forum Rules
·
Mark All Read
Contact Us
·
Help
·
mIRC Homepage