Script won't load to much mysql data.
#9

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
I don't think factions are problem.



Factions are obviously loaded. Server crashed on player connect.
It goes through this aswel when someone connects.

pawn Код:
public LoadCallback(playerid)
{
    //TextDrawHideForPlayer(playerid, Text:BGBox);
    //TextDrawHideForPlayer(playerid, Text:Loading);
    new
        rows,
        fields;

    cache_get_data(rows, fields);
    if(rows == 1)
    {
        new temp[100];
        cache_get_row(0, 0, temp); // #0 = #1 in the DB
        Player[playerid][UserID] = strval(temp);
        cache_get_row(0, 2, Player[playerid][Password]);
        cache_get_row(0, 3, Player[playerid][LastIP]);
        cache_get_row(0, 4, temp);
        Player[playerid][Adminlevel] = strval(temp);
        cache_get_row(0, 5, temp);
        Player[playerid][Money] = strval(temp);
        cache_get_row(0, 6, temp);
        Player[playerid][RegTime] = strval(temp);
        cache_get_row(0, 7, temp);
        Player[playerid][LastOn] = strval(temp);
        cache_get_row(0, 8, temp);
        Player[playerid][Level] = strval(temp);
        cache_get_row(0, 9, temp);
        Player[playerid][Gender] = strval(temp);
        cache_get_row(0, 10, temp);
        Player[playerid][Age] = strval(temp);
        cache_get_row(0, 11, temp);
        Player[playerid][Health] = floatstr(temp);
        cache_get_row(0, 12, temp);
        Player[playerid][Armour] = floatstr(temp);
        cache_get_row(0, 13, temp);
        Player[playerid][Skin] = strval(temp);
        cache_get_row(0, 14, Player[playerid][Country]);
        cache_get_row(0, 15, temp);
        Player[playerid][Test] = strval(temp);
        cache_get_row(0, 16, temp);
        Player[playerid][Faction] = strval(temp);
        cache_get_row(0, 17, temp);
        Player[playerid][FactionRank] = strval(temp);
        cache_get_row(0, 18, Player[playerid][FactionRankName]);
        cache_get_row(0, 19, temp);
        Player[playerid][PrisonSelect] = strval(temp);
        cache_get_row(0, 20, temp);
        Player[playerid][PrisonTime] = strval(temp);
        cache_get_row(0, 21, temp);
        Player[playerid][AdminPrisonCount] = strval(temp);
        cache_get_row(0, 22, temp);
        Player[playerid][SecondsLoggedIn] = strval(temp);
        cache_get_row(0, 23, temp);
        Player[playerid][PlayingHours] = strval(temp);
        cache_get_row(0, 24, temp);
        Player[playerid][AdminCode] = strval(temp);
        cache_get_row(0, 25, temp);
        Player[playerid][PhoneN] = strval(temp);
        cache_get_row(0, 26, temp);
        Player[playerid][PhoneCredit] = strval(temp);
        cache_get_row(0, 27, temp);
        Player[playerid][PhoneBook] = strval(temp);
        cache_get_row(0, 28, temp);
        Player[playerid][House] = strval(temp);
       
        clearPlayerChat(playerid);
        SPD(playerid, DIALOG_AUTHENTICATION);
        TextDrawHideForPlayer(playerid, Text:BGBox);
        TextDrawHideForPlayer(playerid, Text:Loading);
    }
    else if(rows == 0)
    {
        clearPlayerChat(playerid);
        new playernamesplit[3][MAX_PLAYER_NAME], Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        split(Name, playernamesplit, '_');

        if (!strlen(playernamesplit[0]) || !strlen(playernamesplit[1]))
        {
            KickWithMessage(playerid, COLOR_WHITE, "Unfortunately, your name is not in the proper format! Please use the format of "#COL_EMB_LIGHTBLUE"\"Firstname_Lastname\""#COL_EMB_WHITE".");
        }
        else
        {
            SPD(playerid, DIALOG_REGISTER);
        }
    }
    else
    {
        clearPlayerChat(playerid);
        KickWithMessage(playerid, COLOR_WHITE, "There was a "#COL_EMB_RED"fatal error "#COL_EMB_WHITE"during registration! Please contact a developer.");
    }
    return 1;
}
Any errors here?
Reply


Messages In This Thread
Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:08
Re: Script won't load to much mysql data. - by [MG]Dimi - 10.05.2013, 09:10
Re: Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:29
Re: Script won't load to much mysql data. - by [MG]Dimi - 10.05.2013, 09:33
Re: Script won't load to much mysql data. - by smeti - 10.05.2013, 09:35
Re: Script won't load to much mysql data. - by [MG]Dimi - 10.05.2013, 09:40
Re: Script won't load to much mysql data. - by [KHK]Khalid - 10.05.2013, 09:51
Re: Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:53
Re: Script won't load to much mysql data. - by Stefand - 10.05.2013, 09:56
Re: Script won't load to much mysql data. - by smeti - 10.05.2013, 13:59

Forum Jump:


Users browsing this thread: 7 Guest(s)