SA-MP Forums Archive
[debug] Runtime Error 4 (w/ Crash Detect) - 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: [debug] Runtime Error 4 (w/ Crash Detect) (/showthread.php?tid=603372)



[debug] Runtime Error 20 (w/ Crash Detect) - TheCoopster - 22.03.2016

Hi, I've been having a bit of a big issue lately with my script, the thing is, my console is getting spammed with [debug] Runtime Error 20 - Invalid Index Parameter (bad entry point). I took a look into this and found out it has something to do with main(){} so I took a look in my script and moved it to the top of my script like it was said in the post that I read. However, this hasn't worked at all and the problem still exists.

But now here's the funky part. I only get this on Linux servers, if I run it on localhost with my windows server the server doesn't get spammed, it doesn't randomly crash and it works perfectly fine, unlike the Linux ones.

If ANYONE has any information toward this, I will be very grateful for the help.

Thank you.

EDIT: If you need any code or anything to view, please say so. I'll show the parts necessary, or if you would like to help me hand to hand please add my skype (tayto400).


Re: [debug] Runtime Error 4 (w/ Crash Detect) - MicroKyrr - 22.03.2016

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Runtime error 4
Very simple, you're trying to access out-of-bound data in an array, in other words, a cell inside of an array that doesn't exist.

Solution: If you're using the crashdetect plugin, it'll tell you which callback the error is in. Simply debug your code until you find the culprit, then remove it.
Source:here


Re: [debug] Runtime Error 4 (w/ Crash Detect) - TheCoopster - 22.03.2016

Oops, I put the wrong error code ID, it's Runtime Error 20.


Re: [debug] Runtime Error 4 (w/ Crash Detect) - Konstantinos - 22.03.2016

Invalid Index Parameter (bad entry point) is run time error 20. The issue in your case is not about including the main and it used to be a problem last year with the plugins.

https://sampforum.blast.hk/showthread.php?tid=575437

All you have to do is update every single plugin to its latest versions and that seems to fix this.


Re: [debug] Runtime Error 4 (w/ Crash Detect) - TheCoopster - 22.03.2016

I'll give it a go, thanks, I'll update you if this fixes it.


Re: [debug] Runtime Error 4 (w/ Crash Detect) - TheCoopster - 22.03.2016

Alright, what you told me to do somewhat worked.

What I found out was, the priority in which I loaded my plugins was causing the problem along with a bad version of streamer.so.

I found the fix was (if you're using the same plugins as I am.)

Код:
plugins crashdetect.so mysql.so streamer.so sscanf.so Whirlpool.so
If you get the same thing that happened to me, just mess around with the priority and update your plugins. From my understanding you get the same error if you do not have your main(){} above your OnGameModeInit().

Thank you for the help and I hope this helps anyone else in need.


Re: [debug] Runtime Error 4 (w/ Crash Detect) - IstuntmanI - 22.03.2016

Actually, that bug happens only on an older version of crashdetect.