GameMode Help Weird ;/ -
BleverCastard - 11.12.2011
Hello,
I'm making a Pilot Server from scratch, So I added a MySQL DataBase and I went to run the server and it comes up that the "untitled.amx" Is unknown, Yet its in the "Gamemodes" File, someone Help?
Re: GameMode Help Weird ;/ -
iTorran - 11.12.2011
Did you set the gamemode text?
pawn Код:
public OnGameModeInit()
{
SetGameModeText("Server");
// Rest
return 1;
}
Re: GameMode Help Weird ;/ -
Steven82 - 11.12.2011
Put your MySQL connection stuff at the end of OnGameModeInit. It sounds stupid but it WILL fix your problems. Trust me.
Re: GameMode Help Weird ;/ -
BleverCastard - 11.12.2011
Код:
public OnGameModeInit()
{
mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
mysql_query("CREATE TABLE IF NOT EXISTS playerdata(user VARCHAR(24), password VARCHAR(40), score INT(20), money INT(20), IP VARCHAR(16) )");
//Fields:
//Field Name - Use - Type
//user- Player Name - String
//password- Players password - String
//score - Players score - int
//money - Players Cash - int
//IP - Players IP - int
return 1;
}
Thats my GameModeInit, But I have totally forgotton how to call the Main(), Sorry for sounding stupid, this is something I dont do -.-
Re: GameMode Help Weird ;/ -
iTorran - 11.12.2011
pawn Код:
public OnGameModeInit()
{
SetGameModeText("Server");
mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
mysql_query("CREATE TABLE IF NOT EXISTS playerdata(user VARCHAR(24), password VARCHAR(40), score INT(20), money INT(20), IP VARCHAR(16) )");
//Fields:
//Field Name - Use - Type
//user- Player Name - String
//password- Players password - String
//score - Players score - int
//money - Players Cash - int
//IP - Players IP - int
return 1;
}
Try this
Re: GameMode Help Weird ;/ -
Steven82 - 11.12.2011
Well i had this problem, and i just put this at the very bottom of my OnGameModeInit and it worked fine.
Edit: Did not see that he didn't have SetGameModeText.
Re: GameMode Help Weird ;/ -
BleverCastard - 11.12.2011
Still says "file or function is not found" Untitled.amx
Re: GameMode Help Weird ;/ -
iTorran - 11.12.2011
Ah..
Make sure you add the mysql plugin to server config..
server.cfg:
Or whatever the plugin is named
Re: GameMode Help Weird ;/ -
Steven82 - 11.12.2011
Wait? Do you have the MySQL plugin in your plugins folder? And do you have it included under "plugins mysql" on the SA-MP .cfg file?
Edit: iTorran beat me to it..
Re: GameMode Help Weird ;/ -
BleverCastard - 11.12.2011
plugins streamer sscanf Whirlpool a_mysql <<
Defined already and it still says it.