01.08.2016, 07:39
Hello, i have a problem, mySQL loading all data, but not position.
mysql_log:
loading system:
mysql_log:
Код HTML:
[03:36:23] CMySQLHandler::Query(SELECT * FROM `zaidejai` WHERE Vardas = 'Harry_Jones') - Successfully executed. [03:36:23] >> mysql_store_result( Connection handle: 1 ) [03:36:23] CMySQLHandler::StoreResult() - Result was stored. [03:36:23] >> mysql_retrieve_row( Connection handle: 1 ) [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("Lytis") - 0 [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("Skin") - 48 [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("x") - [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("y") - [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("z") - [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("r") - [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("Pinigai") - 20000 [03:36:23] >> mysql_fetch_field_row( Connection handle: 1 ) [03:36:23] CMySQLHandler::FetchField("XP") - 0 [03:36:23] >> mysql_free_result( Connection handle: 1 ) [03:36:23] CMySQLHandler::FreeResult() - Result was successfully free'd. [03:37:44] >> mysql_query( Connection handle: 1 ) [03:37:44] CMySQLHandler::Query(UPDATE `zaidejai` SET Lytis = '0', Skin = '48', X = '148.980651', Y = '-65.400489', Z = '1.578125', R = '115.307769', Pinigai = '20000', XP = '0') - Successfully executed.
Код HTML:
stock loadUser(playerid){ new query[256], tmp[32], Float:pos[4]; format(query, sizeof(query), "SELECT * FROM `zaidejai` WHERE Vardas = '%s'", getName(playerid)); mysql_query(query); mysql_store_result(); mysql_retrieve_row(); mysql_fetch_field_row(tmp, "Lytis"); uInfo[playerid][Lytis] = strval(tmp); mysql_fetch_field_row(tmp, "Skin"); uInfo[playerid][Drabuziai] = strval(tmp); mysql_fetch_field_row(tmp, "x"); pos[0] = floatstr(tmp); mysql_fetch_field_row(tmp, "y"); pos[1] = floatstr(tmp); mysql_fetch_field_row(tmp, "z"); pos[2] = floatstr(tmp); mysql_fetch_field_row(tmp, "r"); pos[3] = floatstr(tmp); mysql_fetch_field_row(tmp, "Pinigai"); uInfo[playerid][Pinigai] = strval(tmp); SetPlayerMoney(playerid, uInfo[playerid][Pinigai]); mysql_fetch_field_row(tmp, "XP"); uInfo[playerid][XP] = strval(tmp); SetPlayerScore(playerid, uInfo[playerid][XP]); mysql_free_result(); SetSpawnInfo(playerid, 0, uInfo[playerid][Drabuziai], pos[0], pos[1], pos[2], pos[3], 0, 0, 0, 0, 0, 0); SpawnPlayer(playerid); printf("[.:.]: Zaidejas %s (IP: %s) pakrautas !", getName(playerid), getIP(playerid)); }