SA-MP Forums Archive
Stia cineva cum rezolv asta? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: Stia cineva cum rezolv asta? (/showthread.php?tid=651673)



Stie cineva cum rezolv asta? - VipBoS - 25.03.2018

[10:50:07] [debug] AMX backtrace:
[10:50:07] [debug] #0 0006ef4c in ?? (1, 2, 1) from GM.amx
[10:50:07] [debug] #1 000162d8 in public OnPlayerStateChange (1, 2, 1) from GM.amx
[10:51:47] [debug] Run time error 4: "Array index out of bounds"
[10:51:47] [debug] Accessing element at index 639 past array upper bound 599
[10:51:47] [debug] AMX backtrace:
[10:51:47] [debug] #0 0006ef4c in ?? (0, 2, 1) from GM.amx
[10:51:47] [debug] #1 000162d8 in public OnPlayerStateChange (0, 2, 1) from GM.amx
[10:52:26] [debug] Run time error 4: "Array index out of bounds"
[10:52:26] [debug] Accessing element at index 639 past array upper bound 599

[10:47:09] [debug] Run time error 4: "Array index out of bounds"
[10:47:09] [debug] Accessing element at index 638 past array upper bound 599

[10:37:48] [debug] Run time error 4: "Array index out of bounds"
[10:37:48] [debug] Accessing element at index 640 past array upper bound 599

CODE OnPlayerStateChange: https://pastebin.com/vWPnMQsW


Re: Stia cineva cum rezolv asta? - 10MIN - 25.03.2018

Eroarea spune totul: Ai accesat un element inexistent al unui (cred ca e la masculin substantivul, idk) array... Adica ai facut ceva de genu:
PHP Code:
new array[10]; //Array cu 10 elemente, fara tag

//undeva la utilizare:

array[2] = 2//OK
array[3] = array[5//OK
array[20] = 123//Errr.. Array index out of bounds... 



Re: Stia cineva cum rezolv asta? - VipBoS - 25.03.2018

Nu prea am inteles nimic din ce ai spus....


Re: Stia cineva cum rezolv asta? - Yuri8 - 25.03.2018

Quote:
Originally Posted by VipBoS
View Post
Nu prea am inteles nimic din ce ai spus....
Adica vroia sa spune ca ai creat o variabila, ex:
Code:
new array[10];
si tu ai atribuit o valoare unei variabile inexistente, adica
Code:
array[20] = x;
Variabila ta se opreste la 10, sau ce ai tu, nu mai departe.


Re: Stia cineva cum rezolv asta? - DyduShxD - 29.03.2018

Quote:
Originally Posted by VipBoS
View Post
Nu prea am inteles nimic din ce ai spus....
Ai putea incepe prin a te lasa de programarea asta idioata,e clar ca nu poti face absolut nimic daca nu esti capabil sa-ti dai seama ce poate inseamna o asemenea eroare de 2 bani.