Error in my first gamemode. -
xX4m4zingXx - 09.01.2015
Hello,
I am making my first gamemode and I got some errors.
I downloaded the new pawn update, if that makes a difference.
This is my script:
Код:
#include <a_samp>
//Colors
#define COLOR_BLACK 0x000000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_RED 0xFF0000AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFFBB00AA
#define COLOR_PURPLE 0xFF00FFAA
#define COLOR_GRAY 0xAFAFAFAA
#define COLOR_LIGHTBLUE 0x0AFFFFAA
main()
{
print("Roleplaying script loaded!");
return 1;
}
OnGameModeInit()
{
print("Gamemode Started.");
AddPlayerClass(79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
return 1;
}
This are my errors:
How can I copy the error log?
greets xX4m4zingXx
Re: Error in my first gamemode. -
DavidSparks - 09.01.2015
Try removing the
"main()"
In my opinion it's useless and will probably fix your error.
Re: Error in my first gamemode. -
Hrb - 09.01.2015
You have to add word "public" before "OnGameModeInit()" so: public OnGameModeInit()
and try to update your include <a_samp> (download new one, from 0.3z)
//Edit: dont remove "main()" these errors are not due to this
Re: Error in my first gamemode. -
xX4m4zingXx - 09.01.2015
I updated the a_samp.inc, but it didn't change anything.
the public thing fixed a warning.
EDIT: I got this pawn:
http://www.compuphase.com/pawn/pawn.htm#DOWNLOAD_WIN
Re: Error in my first gamemode. -
PowerPC603 - 09.01.2015
Removing "main" from your gamemode will not give compile errors, but you will get "invalid entry point" errors in your server console and your server won't even run the script.
Just download the entire samp package from this site and extract the zip file into an empty folder.
Copy your gamemode-script to the "gamemodes" folder and it should work.
Don't download any other pawn compiler, as the one supplied with samp server package was adjusted to work with samp. Newer pawn compilers seem attractive and have more features, but samp won't work with them.
Seems to me like you have old includes and newer ones mixed together.
Also, run pawno.exe first as administrator, then from within pawno, open your gamemode file.
Opening a gamemode file by double clicking it in Windows also gave me some errors (don't remember which).
Re: Error in my first gamemode. -
xX4m4zingXx - 09.01.2015
Quote:
Originally Posted by PowerPC603
Removing "main" from your gamemode will not give compile errors, but you will get "invalid entry point" errors in your server console and your server won't even run the script.
Just download the entire samp package from this site and extract the zip file into an empty folder.
Copy your gamemode-script to the "gamemodes" folder and it should work.
Don't download any other pawn compiler, as the one supplied with samp server package was adjusted to work with samp. Newer pawn compilers seem attractive and have more features, but samp won't work with them.
Seems to me like you have old includes and newer ones mixed together.
Also, run pawno.exe first as administrator, then from within pawno, open your gamemode file.
Opening a gamemode file by double clicking it in Windows also gave me some errors (don't remember which).
|
This worked, Thank you.