Main() function. -
faff - 19.03.2013
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?
Re: Main() function. -
Scenario - 19.03.2013
Quote:
After Putting my server on
|
What do you mean by that?
Re: Main() function. -
faff - 19.03.2013
I mean, By clicking on samp server.exe
Re : Main() function. -
thegreathom - 19.03.2013
^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");
}
Re: Main() function. -
Bakr - 19.03.2013
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.
Re: Main() function. -
faff - 19.03.2013
@Bakr, Sorry. It's Completely from stratch.
And wont trust anybody. :P
Re: Main() function. - Patrick - 19.03.2013
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
Re: Main() function. -
Bakr - 19.03.2013
So the error must have started occurring recently. Double check the newly added code.
Re: Main() function. -
faff - 19.03.2013
@pds2012, didnt worked.
Re: Main() function. -
Scenario - 19.03.2013
I can verify that Bakr is a trustworthy person, believe me, your code is in no danger.
Re: Main() function. -
faff - 19.03.2013
As i just see, It starts the server up, But wont load the gamemode.
Re: Main() function. -
Bakr - 19.03.2013
Again, check the newest added code. And do the print messages actually get displayed?
Re: Main() function. -
legodude - 19.03.2013
do you have addplayerclass?
Re: Main() function. -
faff - 19.03.2013
@Bakr - No.
@Legodude - Yes.
Re: Main() function. -
faff - 19.03.2013
@Bakr - No.
@Legodude - Yes.
Re: Main() function. -
faff - 20.03.2013
So eehm, still didnt figured out
Re: Main() function. -
LarzI - 20.03.2013
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
Re: Main() function. -
faff - 20.03.2013
Here you go.
Re: Main() function. -
Sky™ - 20.03.2013
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
Re: Main() function. -
LarzI - 20.03.2013
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.