View Single Post
m4x
Junior Member
Join Date: Sep 2008
Old 10-03-2008 , 06:25   Re: How to check if A is substring of B?
Reply With Quote #3

Tried this:

if (StrContains(teamspeak_charg, kanal)) {...}
if (StrContains(teamspeak_charg2, kanal)) {...}
if (StrContains(teamspeak_charg3, kanal)) {...}

every IF function is like this:
if (StrContains(teamspeak_charg4, kanal)) {
teamspeak_act_channel = teamspeak_channel;
teamspeak_act_pw = teamspeak_channelpw;
ReplyToCommand(client, "\x04[SM] TS channel %s...", teamspeak_act_channel);


----
where
teamspeak_charg1-5 are the possible strings for argument
and kanal:
decl String:kanal[64];
GetCmdArg(1, kanal, sizeof(kanal));


But it executes everything (in debug it is setting channel to all languages one after the other... until it ends in the last channel (last tested with the IF function.)

What do i have wrong?
THX
m4x is offline