Jump to content
  • 0

Eroare debug


Babu

Question

Salutare sa-mp.ro!

Am o problema care a aparut acum de curand si nu stiu de ce, imi apare in server_log asta
 

[19:37:28] [debug] Run time error 4: "Array index out of bounds"
[19:37:28] [debug]  Attempted to read/write array element at negative index -1
[19:37:28] [debug] AMX backtrace:
[19:37:28] [debug] #0 00061b2c in public SetPlayerSpawn (0) in GM.amx
[19:37:28] [debug] #1 00073460 in ?? (0) in GM.amx
[19:37:28] [debug] #2 00028aa8 in public AB_OnPlayerSpawn (0) in GM.amx
[19:37:28] [debug] #3 0001efd0 in public OnPlayerSpawn (0) in GM.amx
[19:37:30] [debug] OnPlayerDeath(0, 65535, 255)
[19:37:30] [death] Flow died 255

chestia e ca daca mor odata dupa mor incontinu si nu gasesc rezolvare si cand mor imi apare chestia asta in server_log.

Nu inteleg cum sa rezolv asta, va voi lasa mai jos public-urile de mai sus 

SetPlayerSpawn : AICI

OnPlayerSpawn: AICI

OnPlayerDeath: AICI

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1
Acum 16 minute, Babu a spus:

nu prea inteleg..

ideia din tutorial o sati fie de folos ce ti-am dat eu doar trebuie sa intelegi de la ce incepe acel array.

 deci nu iti cunosc linia de unde ai tu eroarea aia sau mai bine zis debug dar banuesc sa fie de la un textdraws sau ceva .

sau sa nu ai  -d3 in pawn.cfg

  • Like 1

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0

salut  iti dau un mic tutorial sa iti dai seama tu.

new array[20]; //Array cu 20 de elemente, fara tag

//spre exemplu undeva la utilizare:

array[10] = 10; //este OK
array[15] = array[17] //este OK
array[25] = 126; //Errr.. Array index out of bounds...

 

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

Link to comment
Share on other sites

  • 0
34 minutes ago, FiveGame said:

salut  iti dau un mic tutorial sa iti dai seama tu.


new array[20]; //Array cu 20 de elemente, fara tag

//spre exemplu undeva la utilizare:

array[10] = 10; //este OK
array[15] = array[17] //este OK
array[25] = 126; //Errr.. Array index out of bounds...

 

nu prea inteleg..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.