error 047: array sizes do not match, or destination array is too small NEED HELP
#1

I get this errors :

Code:
C:\DOCUME~1\MaykoX\MYDOCU~1\DOWNLO~1\19.pwn(9635) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\MaykoX\MYDOCU~1\DOWNLO~1\19.pwn(9636) : error 047: array sizes do not match, or destination array is too small
C:\DOCUME~1\MaykoX\MYDOCU~1\DOWNLO~1\19.pwn(9637) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
At this code :

Code:
  	if (strcmp (cmd, "/adgw", true) == 0)
  {
	if(PlayerAdminLevel[playerid] >= 5)
	{
	new player[MAX_STRING], weaponid [MAX_STRING],ammo[MAX_STRING];
	player = strtok(cmd,idx); //EROR LINE
	weaponid = strtok(cmd,idx); //ERROR LINE
	ammo = strtok(cmd,idx); //ERROR LINE
	if(!strlen(player) || !strlen(weaponid) || !strlen(ammo))
 	{
		SendClientMessage(playerid, COLOR_ERROR, "Correct usage: /adgw [playerid] [weaponid] [ammo]");
		return 1;
	}
	if(!IsPlayerConnected(strval(player))) { SendClientMessage(playerid,COLOR_ERROR,"The player you are trying to give a weapon to is not connected."); return 1;}
	new aname[256];
	new wname[256];
	new weapon[256];
	GetPlayerName(playerid, aname, sizeof(aname));
	GetPlayerName(strval(player), wname, sizeof(wname));
	GetWeaponName(strval(weaponid), weapon, sizeof(weapon));
	format(string, sizeof(string), "Admin: %s has given %s a weapon (%s, AMMO: %d)",aname,wname,weapon,strval(ammo));
	SendClientMessage(playerid, COLOR_ROYALBLUE, string);
	print(string);
	GivePlayerWeapon(strval(player), strval(weaponid), strval(ammo));
	format(string, 100, "\2;**(ADMIN GIVE WEAPON)** %s(%d) Admin Gave Player %s, Weapon: %s, with ammo: %s\2;", string, player,weaponid,ammo);
  ircSay(EchoConnection, EchoChan,string);

	return 1;
}
}
And on top i have this :
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
	new cmd[256];
	new giveplayerid, idx;
	new tmp[256];
	new Message[256];
	new gMessage[256];
	new pName[MAX_PLAYER_NAME+1];
	new iName[MAX_PLAYER_NAME+1];
	cmd = strtok(cmdtext, idx);
I tried everything.. Don't tell me just to make [256] and this stuff bigger...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)