Hallo!
Ich kenn wieder mal meinen Fehler nicht^^
if(strcmp(cmd, "/setrankname", true) == 0)
{
if(AccountInfo[playerid][leader] >= 1)
{
if(!strlen(strget(cmdtext,1)))
return
SendClientMessage(playerid,COLOR_GREY,"Benutze: /setrankname [Rank-ID] [Rankname]");
new rankid = strval(strget(cmdtext,1));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[21];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(result[idx]>21){SendClientMessage(playerid,COLOR_RED,"Maximal 20 Zeichen!");}
else{
new PlayerGangID = AccountInfo[playerid][leader];
if(rankid==1){GangInfo[PlayerGangID][RankN1]=result;} //Zeile 2797
else if(rankid==2){GangInfo[PlayerGangID][RankN2]=result;}//Zeile 2798
else if(rankid==3){GangInfo[PlayerGangID][RankN3]=result;}//Zeile 2799
else if(rankid==4){GangInfo[PlayerGangID][RankN4]=result;}//Zeile 2800
else if(rankid==5){GangInfo[PlayerGangID][RankN5]=result;}//Zeile 2801
else if(rankid==6){GangInfo[PlayerGangID][RankN6]=result;}//Zeile 2802
else if(rankid==7){GangInfo[PlayerGangID][RankNL]=result;}//Zeile 2803
else{SendClientMessage(playerid,COLOR_RED,"Ungültige Rank-ID!");}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED,"Du darfst diesen Befehl nicht benutzen !");
}
return 1;
}
Errors:
***.pwn(2797) : error 047: array sizes do not match, or destination array is too small
***.pwn(2798) : error 047: array sizes do not match, or destination array is too small
***.pwn(2799) : error 047: array sizes do not match, or destination array is too small
***.pwn(2800) : error 047: array sizes do not match, or destination array is too small
***.pwn(2801) : error 047: array sizes do not match, or destination array is too small
***.pwn(2802) : error 047: array sizes do not match, or destination array is too small
***.pwn(2803) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.
Alles anzeigen