18.12.2011, 22:26
(
Последний раз редактировалось teudan; 19.12.2011 в 01:56.
)
(43190) : error 047: array sizes do not match, or destination array is too small
(43201) : error 047: array sizes do not match, or destination array is too small
(43212) : error 047: array sizes do not match, or destination array is too small
(43224) : error 047: array sizes do not match, or destination array is too small
That 4 "if" is for read from a file player, member,leader,helper,admin
(43201) : error 047: array sizes do not match, or destination array is too small
(43212) : error 047: array sizes do not match, or destination array is too small
(43224) : error 047: array sizes do not match, or destination array is too small
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new tmp[128];
if(strcmp(cmd, "/changename", true) == 0)
{
new tmpp[256];
tmpp = strtok(cmdtext, idx);
if(!strlen(tmpp))
{
SendClientMessage(playerid, COLOR_DBLUE, "Correct SYNTAX: /changename [playerid] [new nick]");
return 1;
}
giveplayerid = strval(tmpp);
tmp = strtok(cmdtext, idx);
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(giveplayerid) || Untouchable[giveplayerid] == 1)
{
if(!dini_Exists(string))
{
if(PlayerInfo[giveplayerid][pLeader] != 0)
{
for(new i=0;i<=tessst;i++)
{
if(strcmp(MembInfoo[i][cNume], giveplayer, true) == 0)
{
MembInfoo[i][cNume] = tmp;// here is the error
}
}
SaveLeaders();
}
if(PlayerInfo[giveplayerid][pAdmin] > 0)
{
for(new i=0;i<=tesssst;i++)
{
if(strcmp(MembInfooo[i][cNume], giveplayer, true) == 0)
{
MembInfooo[i][cNume] = tmp;// here is the error
}
}
SaveAdmins();
}
if(PlayerInfo[giveplayerid][pHelper] > 0)
{
for(new i=0;i<=tessssst;i++)
{
if(strcmp(MembInfoooo[i][cNume], giveplayer, true) == 0)
{
MembInfoooo[i][cNume] = tmp;// here is the error
}
}
SaveAdmins();
}
if(PlayerInfo[giveplayerid][pMember] > 0)
{
for(new i=0;i<=tesst;i++)
{
if(strcmp(MembInfo[i][cNume], giveplayer, true) == 0)
{
MembInfo[i][cNume] = tmp;// here is the error
}
}
SaveMembers();
}
SetPlayerName(giveplayerid, tmp);
format(string, sizeof(string),"** Your name was change to %s by %d", tmp, playerid);
SendClientMessage(giveplayerid, COLOR_SEA, string);
format(string, sizeof(string),"** Succeful change %d's name", giveplayer);
SendClientMessage(playerid, COLOR_SEA, string);
new housekey = PlayerInfo[giveplayerid][pPhousekey];
new bizzkey = PlayerInfo[giveplayerid][pPbiskey];
new carkey1 = PlayerInfo[giveplayerid][pPcarkey];
new carkey2 = PlayerInfo[giveplayerid][pPcarkey2];
format(string, sizeof(string),"%s",tmp);
if(PlayerInfo[giveplayerid][pPhousekey] != 9999)
{
strmid(HouseInfo[housekey][hOwner],string,0,strlen(string),255);
ProportionalUpdate(1,housekey);
OnPropTextdrawUpdate(1, housekey);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR,"* House ownership changed successfuly!");
}
if(PlayerInfo[giveplayerid][pPbiskey] != 9999)
{
strmid(BizzInfo[bizzkey][bOwner],string,0,strlen(string),255);
ProportionalUpdate(2,bizzkey);
OnPropTextdrawUpdate(2, bizzkey);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR,"* Business ownership changed successfuly!");
}
if(PlayerInfo[giveplayerid][pPcarkey] != 9999)
{
strmid(CarInfo[carkey1][cOwner],string,0,strlen(string),255);
ProportionalUpdate(4,carkey1);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR,"* First Vehicle ownership changed successfuly!");
}
if(PlayerInfo[giveplayerid][pPcarkey2] != 9999)
{
strmid(CarInfo[carkey2][cOwner],string,0,strlen(string),255);
ProportionalUpdate(4,carkey2);
OnPropTextdrawUpdate(1, housekey);
SendClientMessage(giveplayerid, TEAM_GROVE_COLOR,"* Second Vehicle ownership changed successfuly!");
}
format(string, sizeof(string), "LARP/Users/%s.ini", giveplayer);
fremove(string);
format(string, sizeof(string), "LARP/Users/%s.ini", tmp);
dini_Create(string);
ChangedName[playerid] = 1;
}
}
else
{
format(string, sizeof(string), "%d is not an active player.", giveplayer);
SendClientMessage(playerid, COLOR_RED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
}
return 1;
}
return 1;
}