Hey Community, ich komme hier nicht weiter und verstehe des nicht.
Zeile (23076) : error 047: array sizes do not match, or destination array is too small
Zeile (32063) : error 047: array sizes do not match, or destination array is too small
//----------------------------------[SetCrim]-----------------------------------------------
if(strcmp(cmd, "/suspect", true) == 0 || strcmp(cmd, "/su", true) == 0){
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1) return SendClientMessage(playerid, COLOR_GREY, " Du bist nicht im Dienst !");
new wanteds;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: (/su)spect [playerid/Name] [Wantedpunkte] [Verbrechen]");
giveplayerid = strval(tmp);
strtok(cmdtext, idx);
wanteds = strval(tmp);
if(wanteds < 0 || wanteds > 100) return SendClientMessage(playerid,COLOR_GRAD2, " Du kannst nur zwischen 1 und 100 Wantedpunkten vergeben.");
new grund[200];
Zeile: 23076 grund = strtok(cmdtext,idx);
if (gTeam[playerid] == 2 || IsACop(playerid)) {
if(IsPlayerConnected(giveplayerid)) {
if(giveplayerid != INVALID_PLAYER_ID) {
if (gTeam[giveplayerid] != 2 && !IsACop(giveplayerid)) {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
WantedLevel[giveplayerid] += wanteds;
//WantedLevel[giveplayerid] += Wanteds;
//SetPlayerWantedLevel(giveplayerid, WantedLevel[giveplayerid]);
format(string, sizeof(string), "Du hast %i Wanteds bekommen von %s. Grund: %s", wanteds, sendername, grund);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
format(string, sizeof(string), "Momentanes Wantedlevel: %d", WantedLevel[giveplayerid]);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(IsACop(i)) {
format(string, sizeof(string), "HQ: Alle Einheiten: Reporter: %s", playerid);
SendClientMessage(i, TEAM_BLUE_COLOR, string);
format(string, sizeof(string), "HQ: Verbrechen: %s Wanteds: %i Gesuchter: %s", grund, wanteds, giveplayer);
SendClientMessage(i, TEAM_BLUE_COLOR, string);
}
}
}
return 1;
} else {
SendClientMessage(playerid, COLOR_GRAD2, " Du kannst keinen Polizisten anklagen !");
}
}
} else {
format(string, sizeof(string), " %d ist kein aktiver Spieler.", giveplayerid);
return SendClientMessage(playerid, COLOR_GRAD1, string);
}
} else {
SendClientMessage(playerid, COLOR_GRAD2, " Du bist kein Polizist / FBI / National Guard !");
}
}
2ter Error
if(strcmp(cmd, "/accban", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 4)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
Zeile 32063 giveplayer = strtok(cmdtext, idx);
if(!strlen(giveplayer))
{
SendClientMessage(playerid,COLOR_GRAD2,"FEHLER: /accban [AccountName] (Korrekte Schreibweise erforderlich)");
return 1;
}
new acc[64], acc2[64], year, month, day, readstr[128];
format(acc,sizeof(acc),"/Accounts/%s.ini",giveplayer);
format(acc2,sizeof(acc2),"/Accounts/%s.backup",giveplayer);
if(!fexist(acc))
{
format(string,sizeof(string)," Der Account von %s existiert nicht!",giveplayer);
SendClientMessage(playerid,COLOR_GRAD2,string);
return 1;
}
new File:account = fopen(acc,io_read);
new File:backup = fopen(acc2,io_write);
while(fread(account,readstr))
{
fwrite(backup,readstr);
}
fclose(backup);
fclose(account);
new File:banaccount = fopen(acc,io_write);
fwrite(banaccount,"Level=-999\n");
fclose(banaccount);
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s's Account wurde von %s gebannt! (%d-%d-%d)",giveplayer,sendername,month,day,year);
BanLog(string);
format(string, sizeof(string), "AdmCmd: %s's Account wurde von %s gebannt!",giveplayer,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
return 1;
}