array sizes do not match or destination array is too small
#1

I keep getting this error:

error 047: array sizes do not match, or destination array is too small

here is the code for it:

CMD: setadminname(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
new string[128], newname[15]; //This is the line that is getting the error
if(sscanf(params, "s", newname)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /setadminanme <name>");
PlayerInfo[playerid][pAdminName] = newname;
format(string, sizeof(string), "You set your admin name to %s", newname);
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "You are not authorized to use this command!");
return 1;
}


Any help would be much appreciated
Reply


Messages In This Thread
array sizes do not match or destination array is too small - by skaman44 - 23.07.2013, 13:42
Re: array sizes do not match or destination array is too small - by ThePhenix - 23.07.2013, 13:42
Re: array sizes do not match or destination array is too small - by ToiletDuck - 23.07.2013, 13:44
Re: array sizes do not match or destination array is too small - by skaman44 - 23.07.2013, 13:45
Re: array sizes do not match or destination array is too small - by ReVo_ - 23.07.2013, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)