GameMode Help Weird ;/
#1

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?
Reply
#2

Did you set the gamemode text?

pawn Код:
public OnGameModeInit()
{
SetGameModeText("Server");
// Rest
return 1;
}
Reply
#3

Put your MySQL connection stuff at the end of OnGameModeInit. It sounds stupid but it WILL fix your problems. Trust me.
Reply
#4

Код:
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 -.-
Reply
#5

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
Reply
#6

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.
Reply
#7

Still says "file or function is not found" Untitled.amx
Reply
#8

Ah..
Make sure you add the mysql plugin to server config..

server.cfg:
Код:
plugins mysql
Or whatever the plugin is named
Reply
#9

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..
Reply
#10

plugins streamer sscanf Whirlpool a_mysql <<
Defined already and it still says it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)