SA-MP Forums Archive
MySql Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySql Problem (/showthread.php?tid=343383)



MySql Problem - ColdRain - 17.05.2012

Here i got problem in mysql like everything work when i register my name come in the DataBase

but when i use gmx in my server to restart it its say for me register again help me


Re: MySql Problem - Mandrakke - 17.05.2012

without the codes we can not do anything.


Re: MySql Problem - ColdRain - 17.05.2012

What codes should i give there is 1 million codes!


Re: MySql Problem - Mandrakke - 17.05.2012

perhaps the codes who makes the register and login functions?

in advance, put it anywhere in to your script;

pawn Код:
public OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle)
{
    printf("%d %s %d %d %s %s %d", errorid, error, resultid, extraid, callback, query, connectionHandle);
    return 1;
}
and paste here the console output.


Re: MySql Problem - Shabi RoxX - 17.05.2012

Use mysql_close(); in OnGameModeInt();

Best way is to make a cmd save your data and settimer to restart server and Mysql_close();


An example :
pawn Код:
CMD:gmx(playerid,params[])
{
    if(GetP_VarInt(playerid,p_Adminlevel)  > 4)
    {
        foreach(Player,i)
        {
            UpdatePlayer(i);
        }
        SendClientMessageToAll(C_WHITE,"Server Restarting in 1 minutes for Maintenance.");
        TogglePlayerControllable(playerid, 0);
        DeleteAllTextDraws();
        SetTimer("RestartServer",12000,false);
    }
    return 1;
}
public RestartServer()
{
    mysql_close();
    GameTextForAll("~w~Server ReStarting",2000,0);
    SendRconCommand("gmx");
    return 1;
}



Re: MySql Problem - Mandrakke - 17.05.2012

I have sure that mysql_close() missing is not the source of the problem, once that function is not really necessary. My server uses MySQL and don't have mysql_close() in any callback or function (because the MySQL connection is in an FS and if I reload it with mysql_close(), the server crashes) and it works fine.


Re: MySql Problem - ColdRain - 17.05.2012

i got mysql_close also i try the OnQueryError No Problems Found


Re: MySql Problem - ColdRain - 17.05.2012

Hey i solve my problem but i got other problem

how i can make this ---> DrugHouseOwner[i]=dUserINT(PlayerName(i)).("DrugHouseOwner");

to mysql help me please