SA-MP Forums Archive
Help me please. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me please. (/showthread.php?tid=572725)



Help me please. - FexTern - 01.05.2015

Hello , i have a question , well im trying to make maps for my server and stuff but i added one mapping i made with textures it started giving me this:
Код:
[14:59:17] [debug] Run time error 4: "Array index out of bounds"
[14:59:17] [debug]  Accessing element at index 999 past array upper bound 500
[14:59:17] [debug] AMX backtrace:
[14:59:17] [debug] #0 0006caec in public OnPlayerStateChange () from PHRP23.amx
any ideas? it seems like server is running smooth but the mapping just isnt added

Thank you for helper +1 rep


Re: Help me please. - tantri - 01.05.2015

its bcz the array size is smaller than the values you are storing in that


Re: Help me please. - Dragony92 - 01.05.2015

It's not problem in you map, it's problem in callback OnPlayerStateChange, you are trying to access element at index 999, on variable which have 500 indexes (probably some player variable, MAX_PLAYERS).


Re: Help me please. - FexTern - 01.05.2015

so i should find a problem under ( max players) ?


Re: Help me please. - busternr - 01.05.2015

Give us the code so we can help you


Re: Help me please. - Dragony92 - 01.05.2015

You should find problem under OnPlayerStateChange callback as i already said.


Re: Help me please. - Sithis - 01.05.2015

Show us the relevant code so we can help you.