29.05.2013, 21:04
Ok, so i'm trying to make an admin titles thing. I ran across an issue, well lets just let this do the talking
Код:
C:\Users\Jay\Desktop\FRP\gamemodes\ECRP.pwn(4642) : error 006: must be assigned to an array C:\Users\Jay\Desktop\FRP\gamemodes\ECRP.pwn(40447) : error 047: array sizes do not match, or destination array is too small Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
Код:
CMD:admintitle(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1338)
{
new giveplayerid, tmp[MAX_PLAYER_NAME];
if(!sscanf(params, "us[20]", giveplayerid, tmp))
{
if(IsPlayerConnected(giveplayerid))
{
new string[200];
MySQLCheckConnection();
new giveplayer[MAX_PLAYER_NAME];
giveplayer = PlayerInfo[giveplayerid][pAdminTitle];
new sendername[MAX_PLAYER_NAME];
sendername = PlayerName(playerid);
new escstr[MAX_PLAYER_NAME];
mysql_real_escape_string(tmp, escstr);
//Update the stats time!
format(string, sizeof(string),"UPDATE `userinf` SET `AdminTitle`='%s' WHERE `id`=%d ;", escstr, PlayerInfo[giveplayerid][pSQLID]);
format(string, sizeof(string), "System: %s has changed your AdminTitle to %s.", sendername, tmp);
SendClientMessage(giveplayerid, COLOR_ORANGE, string);
format(string, sizeof(string),"System: %s has changed %s's Admin Title to %s.", sendername, giveplayer, tmp);
ABroadCast(COLOR_YELLOW, string,1);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, " Invalid player!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /AdminTitle [playerid/PartOfName] [Title]");
SendClientMessage(playerid, COLOR_BRIGHTRED, "WARNING, Case sensitive");
}
}
return 1;
}


