23.03.2013, 17:05
I have 2 hours since i'm trying to solve this , i think i'm going crazy ...
I have :
And the error:
I have modify fEnter to 18... 20 nothing ... modify the sFactions to 16 15 still nothing ...
Please some help
I have :
pawn Код:
new Text3D:fEnter[17];
enum Factions
{
fName[50],
fLeader[MAX_PLAYER_NAME],
Float:fX,
Float:fY,
Float:fZ,
fMats,
fDrugs,
fBank,
fMembers,
fWar
};
new sFactions[17][Factions];
//ongamemodeinit
for(new f = 0;f<=sizeof(sFactions);f++)
{
new stringf[256];
format(stringf,sizeof(stringf),"{FFFF00}%s\n{FF0000}Leader:%s\n",sFactions[f][fName],sFactions[f][fLeader]); // 11756
if(f == 1)
{
fEnter[f] = Create3DTextLabel(stringf,RED,sFactions[f][fX],sFactions[f][fY],sFactions[f][fZ],15,-1,1);
}
else if(f<=16){
fEnter[f] = Create3DTextLabel(stringf,RED,sFactions[f][fX],sFactions[f][fY],sFactions[f][fZ],15,-1,1);
AddStaticPickup(19198, 23, sFactions[f][fX],sFactions[f][fY],sFactions[f][fZ]);
}
}
pawn Код:
[19:21:49] [debug] Run time error 4: "Array index out of bounds"
[19:21:49] [debug] Accessing element at index 16 past array upper bound 15
[19:21:49] [debug] AMX backtrace:
[19:21:49] [debug] #0 0008e7e8 in public OnGameModeInit () at shady.pwn:11756
Please some help