18.08.2011, 10:22
Hello,
Check the MySQL Log:
As you see it all returns no value. This is from my LoadHouses stock. I show it:
I don't know why it all returns no value - it worked before.
Now my LoadHouses() is commented in OnGameModeInit. When I load my houses, the server crashes when someone tries to login when mysql_fetch_field_row is called.
Anyone experienced this problem?
Jochem
Check the MySQL Log:
Код:
[18:38:33] [18:38:33] --------------------------- [18:38:33] MySQL Debugging activated (08/17/11) [18:38:33] --------------------------- [18:38:33] [18:38:33] >> mysql_connect( ) [18:38:33] CMySQLHandler::CMySQLHandler() - constructor called. [18:38:33] CMySQLHandler::CMySQLHandler() - Connecting to "184.154.33.53" | DB: "jc" | Username: "jc" ... [18:38:33] CMySQLHandler::Connect() - Connection was successful. [18:38:33] CMySQLHandler::Connect() - Auto-Reconnect has been enabled. [18:38:33] >> mysql_ping( Connection handle: 1 ) [18:38:33] CMySQLHandler::Ping() - Connection is still alive. [18:38:33] >> mysql_query( Connection handle: 1 ) [18:38:33] CMySQLHandler::Query(SELECT * FROM `HouseInfo` WHERE `ID` = '0') - Successfully executed. [18:38:33] >> mysql_store_result( Connection handle: 1 ) [18:38:33] CMySQLHandler::StoreResult() - Result was stored. [18:38:33] >> mysql_num_rows( Connection handle: 1 ) [18:38:33] CMySQLHandler::NumRows() - Returned 1 row(s) [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupOutsidePosX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupOutsidePosY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupOutsidePosZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupInsidePosX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupInsidePosY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupInsidePosZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideAngle") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideAngle") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("InteriorID") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("Locked") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("Price") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("Owner") - [18:38:33] >> mysql_query( Connection handle: 1 ) [18:38:33] CMySQLHandler::Query(SELECT * FROM `HouseInfo` WHERE `ID` = '1') - Successfully executed. [18:38:33] >> mysql_store_result( Connection handle: 1 ) [18:38:33] CMySQLHandler::StoreResult() - Result was stored. [18:38:33] >> mysql_num_rows( Connection handle: 1 ) [18:38:33] CMySQLHandler::NumRows() - Returned 1 row(s) [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupOutsidePosX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupOutsidePosY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupOutsidePosZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupInsidePosX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupInsidePosY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("PickupInsidePosZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnOutsideAngle") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideX") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideY") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideZ") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("SpawnInsideAngle") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("InteriorID") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("Locked") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("Price") - [18:38:33] >> mysql_fetch_field_row( Connection handle: 1 ) [18:38:33] CMySQLHandler::FetchField("Owner") - [18:38:33] >> mysql_query( Connection handle: 1 )
pawn Код:
stock LoadHouses()
{
new Store[30];
for(new h = 0; h < MAX_HOUSES; h ++)
{
format(QueryString,sizeof(QueryString),"SELECT * FROM `HouseInfo` WHERE `ID` = '%d'",h);
mysql_query(QueryString);
mysql_store_result();
if(mysql_num_rows() != 0)
{
mysql_get_field("PickupOutsidePosX",Store); HouseInfo[h][PickupOutsidePosX] = floatstr(Store);
mysql_get_field("PickupOutsidePosY",Store); HouseInfo[h][PickupOutsidePosY] = floatstr(Store);
mysql_get_field("PickupOutsidePosZ",Store); HouseInfo[h][PickupOutsidePosZ] = floatstr(Store);
mysql_get_field("PickupInsidePosX",Store); HouseInfo[h][PickupInsidePosX] = floatstr(Store);
mysql_get_field("PickupInsidePosY",Store); HouseInfo[h][PickupInsidePosY] = floatstr(Store);
mysql_get_field("PickupInsidePosZ",Store); HouseInfo[h][PickupInsidePosZ] = floatstr(Store);
mysql_get_field("SpawnOutsideX",Store); HouseInfo[h][SpawnOutsideX] = floatstr(Store);
mysql_get_field("SpawnOutsideY",Store); HouseInfo[h][SpawnOutsideY] = floatstr(Store);
mysql_get_field("SpawnOutsideZ",Store); HouseInfo[h][SpawnOutsideZ] = floatstr(Store);
mysql_get_field("SpawnOutsideAngle",Store); HouseInfo[h][SpawnOutsideAngle] = floatstr(Store);
mysql_get_field("SpawnInsideX",Store); HouseInfo[h][SpawnInsideX] = floatstr(Store);
mysql_get_field("SpawnInsideY",Store); HouseInfo[h][SpawnInsideY] = floatstr(Store);
mysql_get_field("SpawnInsideZ",Store); HouseInfo[h][SpawnInsideZ] = floatstr(Store);
mysql_get_field("SpawnInsideAngle",Store); HouseInfo[h][SpawnInsideAngle] = floatstr(Store);
mysql_get_field("InteriorID",Store); HouseInfo[h][InteriorID] = strval(Store);
mysql_get_field("Locked",Store); HouseInfo[h][Locked] = strval(Store);
mysql_get_field("Price",Store); HouseInfo[h][Price] = strval(Store);
mysql_get_field("Owner",HouseInfo[h][Owner]);
HouseInfo[h][VirtualWorld] = h;
HouseInfo[h][Owned] = 1;
if(!strlen(HouseInfo[h][Owner])) HouseInfo[h][PickupID] = CreateDynamicPickup(1273,23,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],-1,-1,-1,200.0);
else HouseInfo[h][PickupID] = CreateDynamicPickup(1272,23,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ],-1,-1,-1,200.0);
printf("House File ID %d has been created",h);
}
}
}
Now my LoadHouses() is commented in OnGameModeInit. When I load my houses, the server crashes when someone tries to login when mysql_fetch_field_row is called.
Anyone experienced this problem?
Jochem