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

Quote:
Originally Posted by [MG]Dimi
Посмотреть сообщение
Factions are obviously loaded. Server crashed on player connect.
Yeah. Hence, you should debug (with some prints) your OnPlayerConnect to see where the crash comes from. Here you go, run this OnPlayerConnect and tell us what will be printed in server logs:

pawn Код:
public OnPlayerConnect(playerid)
{
    FadePlayerConnect(playerid);
    print("Faded Player");
    pTeleporting[playerid]= 0;
    //=================SPEEDO================
    speed[playerid] = TextDrawCreate(460.000000, 370.000000, "_");
    TextDrawBackgroundColor(speed[playerid], 255);
    TextDrawFont(speed[playerid], 1);
    TextDrawLetterSize(speed[playerid], 0.469999, 1.500000);
    TextDrawColor(speed[playerid], -1);
    TextDrawSetOutline(speed[playerid], 1);
    TextDrawSetProportional(speed[playerid], 1);

    td_fuel[playerid] = TextDrawCreate(459.000000, 385.000000, "_");
    TextDrawBackgroundColor(td_fuel[playerid], 255);
    TextDrawFont(td_fuel[playerid], 1);
    TextDrawLetterSize(td_fuel[playerid], 0.469900, 1.500000);
    TextDrawColor(td_fuel[playerid], -1);
    TextDrawSetOutline(td_fuel[playerid], 1);
    TextDrawSetProportional(td_fuel[playerid], 1);

    td_vhealth[playerid] = TextDrawCreate(460.000000, 400.000000, "_");
    TextDrawBackgroundColor(td_vhealth[playerid], 255);
    TextDrawFont(td_vhealth[playerid], 1);
    TextDrawLetterSize(td_vhealth[playerid], 0.469900, 1.500000);
    TextDrawColor(td_vhealth[playerid], -1);
    TextDrawSetOutline(td_vhealth[playerid], 1);
    TextDrawSetProportional(td_vhealth[playerid], 1);
    //=================SCORE================
    TName[playerid] = TextDrawCreate(190.000000, 129.000000, "");
    TextDrawBackgroundColor(TName[playerid], 255);
    TextDrawFont(TName[playerid], 1);
    TextDrawLetterSize(TName[playerid], 0.529999, 2.200000);
    TextDrawColor(TName[playerid], 65535);
    TextDrawSetOutline(TName[playerid], 1);
    TextDrawSetProportional(TName[playerid], 1);

    Good[playerid] = TextDrawCreate(190.000000, 175.000000, "");
    TextDrawBackgroundColor(Good[playerid], 255);
    TextDrawFont(Good[playerid], 1);
    TextDrawLetterSize(Good[playerid], 0.529900, 2.200000);
    TextDrawColor(Good[playerid], 16711935);
    TextDrawSetOutline(Good[playerid], 1);
    TextDrawSetProportional(Good[playerid], 1);

    Wrong[playerid] = TextDrawCreate(190.000000, 206.000000, "");
    TextDrawBackgroundColor(Wrong[playerid], 255);
    TextDrawFont(Wrong[playerid], 1);
    TextDrawLetterSize(Wrong[playerid], 0.529900, 2.200000);
    TextDrawColor(Wrong[playerid], -16776961);
    TextDrawSetOutline(Wrong[playerid], 1);
    TextDrawSetProportional(Wrong[playerid], 1);

    print("Created textdraws successfully. Now showing them");

    TextDrawShowForPlayer(playerid, Text:BGBox);
    TextDrawShowForPlayer(playerid, Text:Titleline);
    TextDrawShowForPlayer(playerid, Text:Servertitle);
    TextDrawShowForPlayer(playerid, Text:LLine);
    TextDrawShowForPlayer(playerid, Text:LLine1);
    TextDrawShowForPlayer(playerid, Text:LLine2);
    TextDrawShowForPlayer(playerid, Text:Copyright);
    TextDrawShowForPlayer(playerid, Text:TDVersion);
    TextDrawShowForPlayer(playerid, Text:Loading);
   
    print("Showed textdraws successfully");

    SetPlayerColor(playerid, GREY);
    SetPlayerCamera(playerid, 1415.0320, -1749.1689, 29.9612, 1415.7621, -1748.4803, 29.7203, false);
    TogglePlayerSpectating(playerid, true);
   
    print("Set player colour and camera, and toggled spectating");

    GetPlayerIp(playerid, PlayerIP[playerid], 16);
   
    print("Stored player IP in PlayerIP variable. Now preparing a query");

    new query[128];
    format(query, sizeof(query), "SELECT * FROM `Bans` WHERE `Username` = '%s' OR `Ipaddress` = '%s'", GetName(playerid), PlayerIP[playerid]);

    print("Formatted query successfully");

    mysql_function_query(connectionHandle, query, true, "BansCallback", "d", playerid);
   
    print("mysql_function_query has been done");

    //TextDrawShowForPlayer(playerid, Text:Loading);
    PlayerPlaySound(playerid, 1062, 0.0, 0.0, 0.0);

    //ASGH carpark
    RemoveBuildingForPlayer(playerid, 780, -209.1641, 1005.5625, 18.1797, 0.25);
    RemoveBuildingForPlayer(playerid, 5929, 1230.8906, -1337.9844, 12.5391, 0.25);
    RemoveBuildingForPlayer(playerid, 739, 1231.1406, -1341.8516, 12.7344, 0.25);
    RemoveBuildingForPlayer(playerid, 739, 1231.1406, -1328.0938, 12.7344, 0.25);
    RemoveBuildingForPlayer(playerid, 739, 1231.1406, -1356.2109, 12.7344, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1222.6641, -1374.6094, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1222.6641, -1356.5547, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 1297, 1231.6406, -1389.8672, 15.6719, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1240.9219, -1374.6094, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1240.9219, -1356.5547, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1222.6641, -1335.0547, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1222.6641, -1317.7422, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 5812, 1230.8906, -1337.9844, 12.5391, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1240.9219, -1335.0547, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1240.9219, -1317.7422, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1222.6641, -1300.9219, 12.2969, 0.25);
    RemoveBuildingForPlayer(playerid, 620, 1240.9219, -1300.9219, 12.2969, 0.25);

    //PD
    RemoveBuildingForPlayer(playerid, 1266, 1538.5234, -1609.8047, 19.8438, 0.25);
    RemoveBuildingForPlayer(playerid, 4229, 1597.9063, -1699.7500, 30.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 4230, 1597.9063, -1699.7500, 30.2109, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1538.5234, -1609.8047, 19.8438, 0.25);
    print("Removed some buildings for player");
    Reset(playerid);
    printf("End of OnPlayerConnect(%d)", playerid);
    return 1;
}
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: 3 Guest(s)