SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 17/09/2009, 09:07 AM   #1
help!
Big Clucker
 
Join Date: Sep 2007
Posts: 59
Reputation: 0
Default [SOLVED]error 047: array sizes do not match, or destination array is too small

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 (c) 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;
	 	}
	}
help! is offline  
Old 17/09/2009, 09:38 AM   #2
0ne
Gangsta
 
Join Date: Sep 2009
Posts: 539
Reputation: 0
Default Re: error 047: array sizes do not match, or destination array is too small

Mark the line of error because i don't know where the error shows to
0ne is offline  
Old 17/09/2009, 10:12 AM   #3
help!
Big Clucker
 
Join Date: Sep 2007
Posts: 59
Reputation: 0
Default Re: error 047: array sizes do not match, or destination array is too small

Marked the error.
help! is offline  
Old 17/09/2009, 10:16 AM   #4
Eazy_Efolife
High-roller
 
Join Date: Aug 2009
Posts: 1,141
Reputation: 15
Default Re: error 047: array sizes do not match, or destination array is too small

Find:
new result[64];
and replace it with
new result[128];

all done
Eazy_Efolife is offline  
Old 17/09/2009, 11:07 AM   #5
help!
Big Clucker
 
Join Date: Sep 2007
Posts: 59
Reputation: 0
Default Re: error 047: array sizes do not match, or destination array is too small

problem solved, thanks eazy e.
help! is offline  
Old 17/09/2009, 11:07 AM   #6
Eazy_Efolife
High-roller
 
Join Date: Aug 2009
Posts: 1,141
Reputation: 15
Default Re: error 047: array sizes do not match, or destination array is too small

No Problemo
Eazy_Efolife is offline  
Old 03/03/2011, 10:31 PM   #7
Chemical
Little Clucker
 
Join Date: Jul 2010
Posts: 5
Reputation: 0
Default Re: [SOLVED]error 047: array sizes do not match, or destination array is too small

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 (c) 1997-2006, ITB CompuPhase


1 Error.
Chemical is offline  
Old 18/06/2011, 08:09 PM   #8
RealMan2
Little Clucker
 
RealMan2's Avatar
 
Join Date: Jun 2011
Location: Tunisia
Posts: 46
Reputation: 0
Default Re: [SOLVED]error 047: array sizes do not match, or destination array is too small

Thanks Solved
__________________
Los Santos RolePlay!
RealMan2 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error 047: array sizes do not match, or destination array is too small [NYRP]Mike. Help Archive 5 16/12/2010 06:24 PM
error 047: array sizes do not match, or destination array is too small NEED HELP MaykoX Help Archive 0 14/03/2010 03:44 PM
error 047: array sizes do not match, or destination array is too small DiddyBop Help Archive 3 07/01/2010 05:34 AM


All times are GMT. The time now is 06:00 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.