Main() function.
#1

Hello, After Putting my server on, it crashes.
Once i'm checking the logs, it says this.

Код:
[21:27:08] Script[gamemodes/cssrbeta.amx]: Run time error 20: "Invalid index parameter (bad entry point)"
[21:27:08] Number of vehicle models: 0
And Ehm, Yes. I have the Main() function.

pawn Код:
main()
{
    print("\n----------------------------------");
    print("Counter Strike - Sniper Rampage [0.3x|Beta]");
    print("Scripted, Mapped & Developed by Faff.");
    print("----------------------------------\n");
}

Anyone else that has this problem?
Reply
#2

Quote:

After Putting my server on

What do you mean by that?
Reply
#3

I mean, By clicking on samp server.exe
Reply
#4

^After he open the samp-servers console(samp-servers.exe).

I don't see any problems here?
pawn Код:
main()
{
    print("\n-------------------------------------------------------------------");
    print("     blablabla                                                       ");
    print("                                                     blablabla       ");
    print("-------------------------------------------------------------------\n");
}
Reply
#5

I had this issue not but a few weeks ago, but cannot recall why for the life of me. If you wouldn't mind PMing me the script, I may be able to solve the issue.
Reply
#6

@Bakr, Sorry. It's Completely from stratch.
And wont trust anybody. :P
Reply
#7

where do you put it? im not sure about this. but give it a try. make sure put it above all of your callbacks and below your includes
Reply
#8

So the error must have started occurring recently. Double check the newly added code.
Reply
#9

@pds2012, didnt worked.
Reply
#10

I can verify that Bakr is a trustworthy person, believe me, your code is in no danger.
Reply
#11

As i just see, It starts the server up, But wont load the gamemode.
Reply
#12

Again, check the newest added code. And do the print messages actually get displayed?
Reply
#13

do you have addplayerclass?
Reply
#14

@Bakr - No.

@Legodude - Yes.
Reply
#15

@Bakr - No.

@Legodude - Yes.
Reply
#16

So eehm, still didnt figured out
Reply
#17

If you don't provide needed code, then we most probably can't help you.
We need to see where you placed main().

I personally suspect you putting it inside a directive if-else (#if #else #endif) statement, which won't get called because the if/else doesn't fall through.

Example:

pawn Код:
#if defined FILTERSCRIPT
main() { }
#endif

//This won't execute as FILTERSCRIPT isn't defined
Reply
#18

Here you go.

Reply
#19

the point where the main is currently very on top
..

place on top of the main callback OnGameModeInit

pawn Код:
main()
{
    print("\n----------------------------------");
    print("Counter Strike - Sniper Rampage [0.3x|Beta]");
    print("Scripted, Mapped & Developed by Faff.");
    print("----------------------------------\n");
}

//Ongamemodeinit
Reply
#20

Quote:
Originally Posted by Sky_.
Посмотреть сообщение
the point where the main is currently very on top
..

place on top of the main callback OnGameModeInit

pawn Код:
main()
{
    print("\n----------------------------------");
    print("Counter Strike - Sniper Rampage [0.3x|Beta]");
    print("Scripted, Mapped & Developed by Faff.");
    print("----------------------------------\n");
}

//Ongamemodeinit
That doesn't fix anything.

I recommend re-downloading the latest server package (and plugins, just to be sure everything is up to date and working). This appears to be a bug, and I've found other threads where people had the same problem even though they had main() { } and by re-downloading they fixed the problem.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)