14.11.2009, 06:22
You cannot compare an array with a string directly, you have to use a function (strcmp)
USAGE:
the 'true' is stating that it's going to ignore caps, so it can be 'Channel', 'CHANNEL', or 'channel', doesn't matter. The '7' is how far into either string (EchoChan or "channel") it's going to compare (if it were '4' it would only compare up until "chan"). We're seeing if it equals '0' because 'strcmp' will return 0 when the strings match.
USAGE:
pawn Code:
if( strcmp(EchoChan,"channel",true,7) == 0 )