SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 11/06/2013, 06:28 PM   #1
Red_Dragon.
High-roller
 
Red_Dragon.'s Avatar
 
Join Date: Sep 2012
Posts: 1,391
Reputation: 46
Default How to fix Run time error 20: "Invalid index parameter (bad entry point)" [For Newbies]

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 Code:
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 Code:
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.
Red_Dragon. is offline   Reply With Quote
Old 11/06/2013, 06:29 PM   #2
StayAlive
Big Clucker
 
StayAlive's Avatar
 
Join Date: Apr 2013
Location: Idk
Posts: 64
Reputation: -11
Default Re: How to fix Run time error 20: "Invalid index parameter (bad entry point)" [For Newbies]

Good Job
__________________
StayAlive is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ajuda] Run time error 20: "Invalid index parameter (bad entry point)" ajuda rep ++ Duduloch Português/Portuguese 22 25/09/2012 08:35 PM
Run time error 20: "Invalid index parameter (bad entry Point" privacy94 Scripting Help 9 21/02/2012 04:56 PM
Script[gamemodes/CR-RP.amx]: Run time error 20: "Invalid index parameter (bad entry point)" BizzyD Help Archive 4 20/07/2011 01:26 AM
Runtime Error 20: "Invalid index parameter (bad entry point)" Gupike Help Archive 12 24/01/2011 10:27 AM
Script[gamemodes/SSv1.amx]: Run time error 20: "Invalid index parameter (bad entry point)" HydraX Server Support 0 16/08/2010 11:47 PM


All times are GMT. The time now is 09:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.