[SOLVED]error 047: array sizes do not match, or destination array is too small - 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: [SOLVED]error 047: array sizes do not match, or destination array is too small (
/showthread.php?tid=97850)
[SOLVED]error 047: array sizes do not match, or destination array is too small -
help! - 17.09.2009
The error line is on: PlayerInfo[playerid][pCodename] = result;
Code:
C:\Program Files\Rockstar Games\GTA San Andreas\samp\gamemodes\cwrp.pwn(27216) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Code:
if(strcmp(cmd, "/codename", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /codename [newname]");
return 1;
}
format(string, sizeof(string), "%s", result);
PlayerInfo[playerid][pCodename] = result; <------- THE ERROR IS HERE.
format(string, sizeof(string), "Codename changed to %s.", PlayerInfo[playerid][pCodename]);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that command!");
return 1;
}
}
Re: error 047: array sizes do not match, or destination array is too small -
0ne - 17.09.2009
Mark the line of error because i don't know where the error shows to
Re: error 047: array sizes do not match, or destination array is too small -
help! - 17.09.2009
Marked the error.
Re: error 047: array sizes do not match, or destination array is too small -
Eazy_Efolife - 17.09.2009
Find:
new result[64];
and replace it with
new result[128];
all done
Re: error 047: array sizes do not match, or destination array is too small -
help! - 17.09.2009
problem solved, thanks eazy e.
Re: error 047: array sizes do not match, or destination array is too small -
Eazy_Efolife - 17.09.2009
No Problemo
Re: [SOLVED]error 047: array sizes do not match, or destination array is too small -
Chemical - 03.03.2011
I changed that 64 to 128 but still...
Code:
C:\Users\Villez\Desktop\Ultralightrp\gamemodes\HC-RP3.pwn(12676) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: [SOLVED]error 047: array sizes do not match, or destination array is too small -
RealMan2 - 18.06.2011
Thanks Solved