SA-MP Forums Archive
[Tutorial] How to fix Run time error 20: "Invalid index parameter (bad entry point)" [For Newbies] - 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)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to fix Run time error 20: "Invalid index parameter (bad entry point)" [For Newbies] (/showthread.php?tid=443341)



How to fix Run time error 20: "Invalid index parameter (bad entry point)" [For Newbies] - Red_Dragon. - 11.06.2013

Introduction

I have seen many users posting this error in the scripting help section and they do not know how to fix it, so that's why I thought of making this simple tutorial to help newbies

Let's get started.

Solution

This error is caused due to the absence of the function "main" in your script, so of course the solution is to add the function "main" in your script.

Go at the top of your script and add this snippet
pawn Код:
main(){}
Then go ahead and compile (easiest way to compile is to press F5) and you're done. The error won't appear again in your server console (server log).
___________________________________

Note:

When you open pawno (blank) and press on "New", the function "main" is added by default as this
pawn Код:
main()
{
    print("\n----------------------------------");
    print("  Bare Script\n");
    print("----------------------------------\n");
}
and as you notice the braces contain prints (on the server console) that prints the dashes up and down and the word "Bare Script".

Thank you for reading.


Re: How to fix Run time error 20: "Invalid index parameter (bad entry point)" [For Newbies] - StayAlive - 11.06.2013

Good Job