SA-MP Forums Archive
array problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: array problem (/showthread.php?tid=191604)



array problem - The_Gangstas - 19.11.2010

pawn Код:
C:\Documents and Settings\Karim\My Documents\Grand Theft Auto San Andreas\SA-MP SERVER(CNR)\gamemodes\COPSAR~1.pwn(4569) : warning 213: tag mismatch
on this line ( the strcmp one)
pawn Код:
for(new antipnames; antipnames < sizeof HighPingNames; antipnames++)
            if(!strcmp(Playername(i), HighPingNames[antipnames], true) == 0)
            {
pawn Код:
new HighPingNames[][MAX_PLAYER_NAME] = {
    "dogbox",
    "Catdog"
};



AW: array problem - Extremo - 19.11.2010

You defined the array as array[][] but you use it as array[].. the other [] is missing


Re: array problem - The_Gangstas - 19.11.2010

nvm fixed (8char)


AW: array problem - Extremo - 19.11.2010

Now.. you just defined it as array[][][] but are still using it as array[]...

You made this: HighPingNames[][].. and you are using it as HighPingNames[] on this line:
pawn Код:
if(!strcmp(Playername(i), HighPingNames[antipnames], true) == 0)
EDIT:

I actually misread your problem. Obviously you are declaring an array.. with a size each .. nevermind..Lemme read up the code again o.o


Re: array problem - MadeMan - 19.11.2010

Can you show Playername function?


Re: array problem - The_Gangstas - 19.11.2010

nvm fixed.

pawn Код:
//if(strcmp(Playername(i), HighPingNames[antipnames], true))
            if(!strmatch(Playername(i), HighPingNames[antipnames]))
            {
those to fixed it. and

pawn Код:
new HighPingNames[][]= {
    "dogbox",
    "Catdog"
};