04.07.2018, 09:11
Hello, I managed to fix that houses weren't loading, but I had a problem with my PC and lost that..
here's another i made.. pls help
and MySQL Logs..
MySQL R39
here's another i made.. pls help
Код:
LoadHouses() { new rows = cache_get_row_count(); new Houselabel[145], Cache:housecache, query[45]; mysql_format(dbHandle, query, sizeof(query), "SELECT * FROM `houses`"); housecache = mysql_query(dbHandle, query, true); for(new i = 0; i < rows; i++) { cache_set_active(housecache); for(new z = 0; z < MAX_HOUSES; z++) { hInfo[z][HouseEX] = cache_get_field_content_float(i, "HouseEX"); hInfo[z][HouseEY] = cache_get_field_content_float(i, "HouseEY"); hInfo[z][HouseEZ] = cache_get_field_content_float(i, "HouseEZ"); cache_get_field_content(i, "HouseTitle", hInfo[z][HouseTitle]); hInfo[z][HouseOwned] = cache_get_field_content_int(i, "HouseOwned"); cache_get_field_content(i, "HouseOwner", hInfo[z][HouseOwner]); hInfo[z][HousePassworded] = cache_get_field_content_int(i, "HousePassworded"); cache_get_field_content(i, "HousePassword", hInfo[z][HousePassword]); hInfo[z][HousePrice] = cache_get_field_content_int(i, "HousePrice"); if(hInfo[i][HouseOwned] == 0) { format(Houselabel, 145, "{FFD700}House Title(%i): {FFFFFF}%s\n{FFD700}House Owner: {FFFFFF}No-one\n {FFD700}House Price: {FFFFFF}$%d", hInfo[z][HouseID], hInfo[z][HouseTitle], hInfo[z][HousePrice]); hInfo[z][HouseDetails] = CreateDynamic3DTextLabel(Houselabel, 0xFFFFFF, hInfo[z][HouseEX], hInfo[z][HouseEY], hInfo[z][HouseEZ], 15.0, .worldid = 0, .interiorid = 0, .streamdistance = 15.0); hInfo[z][HouseCP] = CreateDynamicCP(hInfo[z][HouseEX], hInfo[z][HouseEY], hInfo[z][HouseEZ], 1, .worldid = 0, .interiorid = 0, .streamdistance = 15); } else if(hInfo[i][HouseOwned] == 1) { format(Houselabel, 145, "{FFD700}House Title(%i): {FFFFFF}%s\n{FFD700}House Owner: {FFFFFF}%s\n {FFD700}House Price: {FFFFFF}$%d", hInfo[z][HouseID], hInfo[z][HouseTitle], hInfo[z][HousePrice]); hInfo[z][HouseDetails] = CreateDynamic3DTextLabel(Houselabel, 0xFFFFFF, hInfo[z][HouseEX], hInfo[z][HouseEY], hInfo[z][HouseEZ], 15.0, .worldid = 0, .interiorid = 0, .streamdistance = 15.0); hInfo[z][HouseCP] = CreateDynamicCP(hInfo[z][HouseEX], hInfo[z][HouseEY], hInfo[z][HouseEZ], 1, .worldid = 0, .interiorid = 0, .streamdistance = 15); break; } housecache = cache_save(); } } }
Код:
[14:34:00] [ERROR] "mysql_tquery" - invalid connection handle (id: 1) [14:34:00] [WARNING] cache_get_field_content_float - no active cache [14:34:00] [WARNING] cache_get_field_content_float - no active cache [14:34:00] [WARNING] cache_get_field_content_float - no active cache [14:34:00] [WARNING] cache_get_field_content_int - no active cache [14:34:00] [WARNING] cache_get_field_content_int - no active cache [14:34:00] [WARNING] cache_get_row_count - no active cache [14:34:02] [ERROR] cache_get_field_content_int - invalid datatype [14:34:03] [WARNING] cache_get_field_content_int - no active cache