1 Super ANNOYING ERROR and WARNING. - 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: 1 Super ANNOYING ERROR and WARNING. (
/showthread.php?tid=271183)
1 Super ANNOYING ERROR and WARNING. -
Ben7544 - 23.07.2011
Hello, well amm.. here's the error:
PHP код:
(12678) : error 035: argument type mismatch (argument 1)
And here's the warning:
PHP код:
(12677) : warning 202: number of arguments does not match definition
Line 12677:
pawn Код:
GetPlayerName(playerid, hisname[MAX_PLAYER_NAME]);
Line 12678:
pawn Код:
if(strcmp(Houses[h][hOwner] == hisname[MAX_PLAYER_NAME]) {
'hisname' variable definetion :
pawn Код:
new id, hisname[MAX_PLAYER_NAME+1];
Re: 1 Super ANNOYING ERROR and WARNING. -
MoroDan - 23.07.2011
This:
pawn Код:
GetPlayerName(playerid, hisname[MAX_PLAYER_NAME]);
Must be:
PHP код:
GetPlayerName(playerid, hisname, sizeof(hisname));
And this:
pawn Код:
if(strcmp(Houses[h][hOwner] == hisname[MAX_PLAYER_NAME]) {
Must be:
PHP код:
if(!strcmp(Houses[h][hOwner], hisname)) {