Szerző Téma: Run time error 4: "Array index out of bounds"  (Megtekintve 1929 alkalommal)

Nem elérhető skyLine

  • Globális moderátor
  • 2171
  • 2020
  • Vaterán
    • Profil megtekintése
Run time error 4: "Array index out of bounds"
« Dátum: 2012. Október 06. - 22:00:05 »
0 Show voters
Sziasztok
Életemben nem láttam ilyet.


[20:33:47] Number of vehicle models: x
[20:33:48] [gamemodes/afterlife.amx]: During execution of vitals:
[20:33:48] [gamemodes/afterlife.amx]: Run time error 4: \"Array index out of bounds\"
[20:33:49] [gamemodes/afterlife.amx]: During execution of vitals:
[20:33:49] [gamemodes/afterlife.amx]: Run time error 4: \"Array index out of bounds\"
[20:33:50] [gamemodes/afterlife.amx]: During execution of vitals:
[20:33:50] [gamemodes/afterlife.amx]: Run time error 4: \"Array index out of bounds\"
[20:33:51] [gamemodes/afterlife.amx]: During execution of vitals:
[20:33:51] [gamemodes/afterlife.amx]: Run time error 4: \"Array index out of bounds\"
[20:33:52] [gamemodes/afterlife.amx]: During execution of vitals:
[20:33:52] [gamemodes/afterlife.amx]: Run time error 4: \"Array index out of bounds\"
[20:33:53] [gamemodes/afterlife.amx]: During execution of vitals:
[20:33:53] [gamemodes/afterlife.amx]: Run time error 4: \"Array index out of bounds\"

 
Kicrashel a szerver, ha hoston van. Házilag rendesen mûködik...
« Utoljára szerkesztve: 2012. Október 06. - 22:12:39 írta SkyLinE »

Nem elérhető Benceee

  • 4785
    • Profil megtekintése
Run time error 4: "Array index out of bounds"
« Válasz #1 Dátum: 2012. Október 06. - 22:13:52 »
0 Show voters

Run time error 4: "Array index out of bounds"
« Válasz #2 Dátum: 2012. Október 06. - 23:39:38 »
0 Show voters
Array index out of bounds = A tömbben olyan cella azonosítót használsz ami nagyobb mint a tömb mérete
pl:
new asd[4];
asd[4] = 0;
a tömbök celláit 0 tól n-1 ig lehet számozni.

Nem elérhető skyLine

  • Globális moderátor
  • 2171
  • 2020
  • Vaterán
    • Profil megtekintése
Run time error 4: "Array index out of bounds"
« Válasz #3 Dátum: 2012. Október 07. - 08:34:03 »
0 Show voters
Idézetet írta: hegdavid95 date=1349559578\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28347\" data-ipsquote-contentclass=\"forums_Topic
Array index out of bounds = A tömbben olyan cella azonosítót használsz ami nagyobb mint a tömb mérete
pl:
new asd[4];
asd[4] = 0;
a tömbök celláit 0 tól n-1 ig lehet számozni.
 
Ez konkrét dolgot annyira nem árult el nekem.
Ha megnézed
[gamemodes/afterlife.amx]

 
60000 sorból elég nehéz kiválogatni, hogy hol van nagyobb cella.

Run time error 4: "Array index out of bounds"
« Válasz #4 Dátum: 2012. Október 07. - 10:14:55 »
+1 Show voters
Erre fele keresgélj ...
public vitals()

Nem elérhető skyLine

  • Globális moderátor
  • 2171
  • 2020
  • Vaterán
    • Profil megtekintése
Run time error 4: "Array index out of bounds"
« Válasz #5 Dátum: 2012. Október 07. - 12:29:34 »
0 Show voters
Idézetet írta: attila91 date=1349597695\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28347\" data-ipsquote-contentclass=\"forums_Topic
Erre fele keresgélj ...
public vitals()

 

Stringet állítgatom ide oda, de nem haladok egyrõl a kettõre.
 
public vitals()
{
    for(new i = 0; i <= MAX_PLAYERS; i++)
    {
new string[255];
new Float:qHealth, Float:qArmour, Float:Ehseg1, Float:Szomjusag1, Float:Wc1, Float:Szint1;
GetPlayerHealth(i,qHealth);
GetPlayerArmour(i,qArmour);
Ehseg1 = PlayerInfo[eseg];
Szomjusag1 = PlayerInfo[szomjas];
Wc1 = PlayerInfo[szukseg];
Szint1 = PlayerInfo[pLevel];
format(string, sizeof(string), \"%.0f%\", qHealth);
TextDrawSetString(Health, string);
format(string, sizeof(string), \"%.0f%\", qArmour);
TextDrawSetString(Armour, string);
format(string, sizeof(string), \"%.0f%\", Ehseg1);
TextDrawSetString(Ehseg, string);
format(string, sizeof(string), \"%.0f%\", Szomjusag1);
TextDrawSetString(Szomjusag, string);
format(string, sizeof(string), \"%.0f%\", Wc1);
TextDrawSetString(Wc, string);
format(string, sizeof(string), \"%.0f\", Szint1);
TextDrawSetString(Szint, string);
}
}
« Utoljára szerkesztve: 2012. Október 07. - 12:54:21 írta SkyLinE »

Run time error 4: "Array index out of bounds"
« Válasz #6 Dátum: 2012. Október 07. - 13:12:42 »
+1 Show voters
for(new i = 0; i <= MAX_PLAYERS; i++)

 Helyett
for(new i = 0; i <MAX_PLAYERS;i++)

 Igy jólesz.  :whistle:

Nem elérhető skyLine

  • Globális moderátor
  • 2171
  • 2020
  • Vaterán
    • Profil megtekintése
Run time error 4: "Array index out of bounds"
« Válasz #7 Dátum: 2012. Október 07. - 13:28:20 »
0 Show voters
Idézetet írta: attila91 date=1349608362\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"28347\" data-ipsquote-contentclass=\"forums_Topic

for(new i = 0; i <= MAX_PLAYERS; i++)

 Helyett
for(new i = 0; i <MAX_PLAYERS;i++)

 Igy jólesz.  :whistle:
 
Drága testvérem téged Isten küldött! Meghívlak egy sörre!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal