23.07.2013, 13:42
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
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