New MySQL R41 converting from R33 pissing me off.
#1

So I have been having none stop issues with converting from R33 to R41 to get my buildings and Applications to load in. I've gotten a bit of progress with the code below, It prints in the console for applications but it shows no name, When I go into game with the script it sits me at connecting screen and does nothing. If I remove the load application code I can get into game fine.

Code:
Application for loaded successfully.
The buildings do the same but allow me to go into game, The buildings print this below into the console, When in game all values are set to 0 though.

Code:
 created successfully
The code I'm running to load these.


PHP Code:
/*forward LoadApplicationsSQL(id);
public LoadApplicationsSQL(id)
{
    new rows;
    cache_get_row_count(rows);
    if(cache_num_rows())
    {
        if(ApplicationInfo[id][SentIn] == 0)
           {
               new fetch[256], string[256];
               cache_get_value_name_int(id, "ID", ApplicationInfo[id][ID]);
               cache_get_value_name(id, "Name", fetch);
            format(ApplicationInfo[id][Name], 128, fetch);
            cache_get_value_name(id, "Question1", fetch);
            format(ApplicationInfo[id][Question1], 128, fetch);
            cache_get_value_name(id, "Question2", fetch);
            format(ApplicationInfo[id][Question2], 128, fetch);
            cache_get_value_name(id, "Question3", fetch);
            format(ApplicationInfo[id][Question3], 128, fetch);
            cache_get_value_name(id, "Question4", fetch);
            format(ApplicationInfo[id][Question4], 128, fetch);
            cache_get_value_name(id, "Question5", fetch);
            format(ApplicationInfo[id][Question5], 128, fetch);
            cache_get_value_name(id, "Question6", fetch);
            format(ApplicationInfo[id][Question6], 128, fetch);
            cache_get_value_name(id, "Accepted", fetch);
            ApplicationInfo[id][AppPassed]= strval(fetch);
            cache_get_value_name(id, "SentIn", fetch);
            ApplicationInfo[id][SentIn]= strval(fetch);
            ApplicationInfo[id][PlayerID] = -1;
            format(string, sizeof(string), "Application for %s loaded", ApplicationInfo[id][Name]);
               print(string);
        }
    }
    return 1;
}
stock LoadApplications()
{
    new query[256];
    for(new i = 1; i < MAX_APPLICATIONS; i++)
    {
        format(query, sizeof(query), "SELECT * FROM applications WHERE ID=%i", i);
        mysql_tquery(mysql, query, "LoadApplicationsSQL", "d", i);
    }
    return 1;
}
stock LoadBuildings()
{
    new Query[216];
    for(new idd = 1; idd < MAX_BUILDINGS; idd++)
    {
        mysql_format(mysql, Query, sizeof(Query), "SELECT * FROM `buildings` WHERE `ID` = %i", idd);
        new Cache:result = mysql_query(mysql, Query, true);
        if(cache_num_rows())
        {
               new fetch[256];
            cache_get_value_name_int(0, "ID", BuildingInfo[idd][ID]);
             cache_get_value_name(idd, "Name", fetch);
            format(BuildingInfo[idd][Name], 256, fetch);
            cache_get_value_name_float(idd, "EnterX", BuildingInfo[idd][EnterX]);
            cache_get_value_name_float(idd, "EnterY", BuildingInfo[idd][EnterY]);
            cache_get_value_name_float(idd, "EnterZ", BuildingInfo[idd][EnterZ]);
            cache_get_value_name_float(idd, "ExitX", BuildingInfo[idd][ExitX]);
            cache_get_value_name_float(idd, "ExitY", BuildingInfo[idd][ExitY]);
            cache_get_value_name_float(idd, "ExitZ", BuildingInfo[idd][ExitZ]);
            cache_get_value_name_int(idd, "Interior", BuildingInfo[idd][Int]);
            cache_get_value_name_int(idd, "VirtualWorld", BuildingInfo[idd][VW]);
            cache_get_value_name_int(idd, "FreezeTimer", BuildingInfo[idd][FreezeTimer]);
            if(BuildingInfo[idd][EnterX] > 0.0) {
                new string[256];
                  format(string, sizeof(string), "%s\nPress H to enter\nAlso /Enter or /Exit", BuildingInfo[idd][Name]);
                Build3D[idd] = CreateDynamic3DTextLabel(string,0xFFFFFFFF,BuildingInfo[idd][EnterX],BuildingInfo[idd][EnterY],BuildingInfo[idd][EnterZ]+0.75, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, 0, -1, 100.0);
                   BuildPickup[idd] = CreateDynamicPickup(1318, 1, BuildingInfo[idd][EnterX],BuildingInfo[idd][EnterY],BuildingInfo[idd][EnterZ]);
                   format(string, sizeof(string), "%s created successfully", BuildingInfo[idd][Name]);
                   print(string);
            }
        }
        else cache_delete(result);
    }
    return 1;
}*/ 
They save into the database just fine, but nothing that I do and what's been suggested already is loading them. Nothing shows up in my MySQL_Log so I don't know whats going on.
Reply


Messages In This Thread
New MySQL R41 converting from R33 pissing me off. - by TheLeech - 20.01.2019, 09:41
Re: New MySQL R41 converting from R33 pissing me off. - by Jeffry - 20.01.2019, 09:52
Re: New MySQL R41 converting from R33 pissing me off. - by TheLeech - 20.01.2019, 09:57
Re: New MySQL R41 converting from R33 pissing me off. - by Jeffry - 20.01.2019, 09:59

Forum Jump:


Users browsing this thread: 2 Guest(s)