MySQL not loading on server restart
#1

Hello,

My server is connecting to my corresponding MySQL server each time I restart my server from my host's control panel (a mass restart), however, when I restart my server via. rcon gmx, it never reloads the SQL.

It's a strange bug but I was wondering if anyone could help me with it. Here is my OnGameModeInit and OnGameModeExit parts of my code:

Код:
public OnGameModeInit()
{
    mainconnection = mysql_connect(SQL_HOST, SQL_USER, SQL_DB, SQL_PASS);
    sqlconnection = mysql_connect(HOUSE_HOST, HOUSE_USER, HOUSE_NAME, HOUSE_PASSWORD);

.....
Defines.. (all the SQL_Host and blah blah below are filled in, in my game mode)

Код:
//Server database
#define SQL_HOST "N/A" // The SQL host that the game mode will connect to.
#define SQL_USER "N/A"
#define SQL_PASS "N/A"
#define SQL_DB 	 "N/A"

#define HOUSE_TABLE_NAME "Houses"

//House database
#define HOUSE_HOST "N/A"
#define HOUSE_USER "N/A"
#define HOUSE_PASSWORD "N/A"
#define HOUSE_NAME "N/A"
Код:
public OnGameModeExit()
{
	for(new i=1; i < MAX_DVEHICLES; i++)
	{
		if(VehicleCreated[i])
		{
			DestroyVehicle(VehicleID[i]);
			if(VehicleCreated[i] == VEHICLE_DEALERSHIP)
			{
				Delete3DTextLabel(VehicleLabel[i]);
			}
		}
	}
	for(new i=1; i < MAX_DEALERSHIPS; i++)
	{
		if(DealershipCreated[i])
		{
			Delete3DTextLabel(DealershipLabel[i]);
		}
	}
	TextDrawHideForAll(Textdraw0);
	TextDrawDestroy(Textdraw0);
	TextDrawHideForAll(Textdraw1);
	TextDrawDestroy(Textdraw1);
	FadeExit();
	Delete3DTextLabel(Text3D:armysupplies);
    return 1;
}
Cheers
Reply


Messages In This Thread
MySQL not loading on server restart - by dthompson - 12.02.2013, 08:12
Re: MySQL not loading on server restart - by iggy1 - 12.02.2013, 08:30
Re: MySQL not loading on server restart - by dthompson - 12.02.2013, 08:33
Re: MySQL not loading on server restart - by dthompson - 12.02.2013, 18:30
Re: MySQL not loading on server restart - by adsy - 12.02.2013, 18:39
Re: MySQL not loading on server restart - by dthompson - 12.02.2013, 19:10
Re: MySQL not loading on server restart - by adsy - 12.02.2013, 21:48
Re: MySQL not loading on server restart - by dthompson - 12.02.2013, 22:47

Forum Jump:


Users browsing this thread: 1 Guest(s)