Szerző Téma: Host error!  (Megtekintve 640 alkalommal)

Host error!
« Dátum: 2015. November 10. - 06:09:02 »
0 Show voters
Sziaisztok.Miert floodolja ezt a hibat a host :
[2015/11/10 06:01:22] [debug] #2 0019bffc in public SyncUp () from SGRPG.amx
[2015/11/10 06:01:22] [debug] #1 0019c288 in ?? () from SGRPG.amx
[2015/11/10 06:01:22] [debug] #0 00441c40 in ?? () from SGRPG.amx
[2015/11/10 06:01:22] [debug] AMX backtrace:
[2015/11/10 06:01:22] [debug] Accessing element at index 2976 past array upper bound 7
[2015/11/10 06:01:22] [debug] Run time error 4: \"Array index out of bounds\"
[2015/11/10 06:00:21] [debug] #2 0019bffc in public SyncUp () from SGRPG.amx
[2015/11/10 06:00:21] [debug] #1 0019c288 in ?? () from SGRPG.amx
[2015/11/10 06:00:21] [debug] #0 00441c40 in ?? () from SGRPG.amx
[2015/11/10 06:00:21] [debug] AMX backtrace:
[2015/11/10 06:00:21] [debug] Accessing element at index 2902 past array upper bound 7
[2015/11/10 06:00:21] [debug] Run time error 4: \"Array index out of bounds\"

Nem elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Host error!
« Válasz #1 Dátum: 2015. November 10. - 11:21:23 »
0 Show voters
Run time error 4: \"Array index out of bounds\"[/quote]
van egy tömböd, mondjuk 5 cellával: 0-4-ig indexelve ugye, de te mondjuk az 5. vagy a 73. cellára hivatkoznál ami ugye nem létezik!
 
new tomb[5]; // 0-4
if(tomb[5] == ertek)
if(tomb[73] == ertek)

 
de lehet te nem számmal hivatkozol hanem egy változóval...
 
new tomb[5]; // 0-4
new cella = 5;
if(tomb[cella] == ertek)
cella = 73;
if(tomb[cella] == ertek)

 
vagy esetleg még ciklusnál lehet rosszul írtad a feltételt
 
new tomb[MAX_PLAYERS];
for(new i; i <= MAX_PLAYERS; i++)
{
    if(tomb == ertek)
    ...
}
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal