Major Disconnect Issue [Rep+]
#1

Hey,

I have recently discovered an issue with my script, when a player connects and try to register they get disconnected, I currently use MySQL on my server and have no problems with home host, it is only when i upload to volt-host.com, also my PlayerInfo vars are not working correct, could this be something to do with Linux?

OnPlayerConnect:
pawn Код:
public OnPlayerConnect(playerid)
{
    if(TestMode == 1 && PlayerInfo[playerid][pAdminLevel] == 0)
    {
        SendClientMessage(playerid,COLOR_RED,"** Server Is Currently In Testing.");
        Kick(playerid);
        return 1;
    }
    else if(TestMode == 1 && PlayerInfo[playerid][pAdminLevel] >= 1)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"** Server Is Currently In Testing");
        SendClientMessage(playerid,COLOR_YELLOW,"** The Server Is Currently In Lock Down Administrator");
        return 1;
    }
    else
    {
        new name[MAX_PLAYER_NAME],string[128];
        GetPlayerName(playerid,name,MAX_PLAYER_NAME);
        format(string,sizeof(string),"** %s Has Joined Los Santos Cops And Robbers!",name);
        SendClientMessageToAll(COLOR_GREY,string);
    }
    return 1;
}
Testmode is currently defined in the GameModeInit section
pawn Код:
TestMode = 0;
MySQL Parts:
pawn Код:
public OnQueryError(errorid, error[], resultid, extraid, callback[], query[], connectionHandle) return printf(" MySQL ERROR: errorid: %d | error: %s | resultid: %d | extraid: %d | callback: %s | query: %s", errorid, error, resultid, extraid, callback, query);

public OnQueryFinish(query[], resultid, extraid, connectionHandle) // this is for threaded SQL queries
{
    switch(resultid)
    {
        case qDefault: return 1;
        case qAuthentication:
        {
            mysql_store_result();
            if(mysql_num_rows() == 1)
            {
                new szResult[500];
                while(mysql_fetch_row_format(szResult, "|"))
                {
                    sscanf(szResult, "e<p<|>s[25]s[30]ddddddddddddddffdddd", PlayerInfo[extraid]);
                    SPD(extraid, diagAuthentication);
                }
            }
            else if(mysql_num_rows() < 1) SPD(extraid, diagRegistration);
            else SendClientMessage(extraid, COLOR_RED, "There appears to be a problem in our database, please contact an administrator.");
            mysql_free_result();
        }
    }
    return 1;
}
PlayerInfo:

pawn Код:
enum E_PLAYER_INFO
{
    pUsername[25],
    pPassword[31],
    pAdminLevel,
    pDonator,
    pCheater,
    pBanned,
    pMuted,
    pTimesRobbed,
    pRobbed,
    pWantedLevelsGained,
    pWantedLevel,
    pKills,
    pDeaths,
    pScore,
    pCash,
    pArmour,
    pHealth,
    pJailed,
    pPrisoned,
    pLastOnline,
    pTimeOnline
};

new PlayerInfo[MAX_PLAYERS][E_PLAYER_INFO];
If you need anymore code then please tell me also he said he gets the error of "Lost Connection To The Server"

This has only been tested on 1 person if anyone could test for me please reply.

Thanks in advance

Sorry for the length of the thread.

-Michael
Reply
#2

What happenz when you remove your admin level and rejoin,
Reply
#3

basically at the moment i need to /rcon login ******* /makeadmin 0 8 in order to be able to use commands. On rejoin on windows that information is saved, on each rejoin which makes me think it could be an error in that however, on volt-host.com they use Linux could this be part of the issue? Also my plugins and includes:
Код:
Includes:
a_samp
mysql
jBan
zcmd
Код:
Plugins:
sscanf2
mysql r5 by g_style
Streamer 0.3c
Could any of the above be the problem?

-Michael
Reply
#4

Okay, basically there is a problem with MySQL, due to the fact that i log off then when i log back in there is no dialogs nothing,
Reply
#5

You might have something like #define USE_DIALOGS set to false... just look for anything that might look like that in your script.
Reply
#6

hmm, I don't think this is the case as when a player joins the server for the first time after gmx they get the dialog fine its only after when the /q and come back does this fail to show.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)