stock SalvarCasas() { for(new houseid = 1; houseid < MAX_HOUSES; houseid++) { new rows, fields; cache_get_row_count(rows); cache_get_field_count(fields); if(rows) { new query[1030]; mysql_format(ConnectMYSQL, query, sizeof(query), "UPDATE `houses` SET `hType` = '%d', `hOwner` = '%d', `hOutPosX` = '%f', `hOutPosY` = '%f', `hOutPosZ` = '%f', `hLocked` = '%d', `hAlarm` = '%d', `hMoney` = '%d', `hMaconha` = '%d', `hMaterial` = '%d', `FHQ` = '%d' WHERE `hID` = '%i'", HouseInfo[houseid][hType], HouseInfo[houseid][hOwner], HouseInfo[houseid][hOutPosX], HouseInfo[houseid][hOutPosY], HouseInfo[houseid][hOutPosZ], HouseInfo[houseid][hLocked], HouseInfo[houseid][hAlarm], HouseInfo[houseid][hMoney], HouseInfo[houseid][hMaconha], HouseInfo[houseid][hMaterial], HouseInfo[houseid][FHQ], houseid); mysql_pquery(ConnectMYSQL, query); } } }
stock SalvarCasas() { new query[1030]; for(new houseid = 1; houseid < MAX_HOUSES; houseid++) { mysql_format(ConnectMYSQL, query, sizeof(query), "UPDATE `houses` SET `hType` = '%d', `hOwner` = '%d', `hOutPosX` = '%f', `hOutPosY` = '%f', `hOutPosZ` = '%f', `hLocked` = '%d', `hAlarm` = '%d', `hMoney` = '%d', `hMaconha` = '%d', `hMaterial` = '%d', `FHQ` = '%d' WHERE `hID` = '%i'", HouseInfo[houseid][hType], HouseInfo[houseid][hOwner], HouseInfo[houseid][hOutPosX], HouseInfo[houseid][hOutPosY], HouseInfo[houseid][hOutPosZ], HouseInfo[houseid][hLocked], HouseInfo[houseid][hAlarm], HouseInfo[houseid][hMoney], HouseInfo[houseid][hMaconha], HouseInfo[houseid][hMaterial], HouseInfo[houseid][FHQ], houseid); mysql_pquery(ConnectMYSQL, query); } }
Retire essa checagem de rows, jб que nгo tem nenhum query antes, ficando assim:
Код:
stock SalvarCasas() { new query[1030]; for(new houseid = 1; houseid < MAX_HOUSES; houseid++) { mysql_format(ConnectMYSQL, query, sizeof(query), "UPDATE `houses` SET `hType` = '%d', `hOwner` = '%d', `hOutPosX` = '%f', `hOutPosY` = '%f', `hOutPosZ` = '%f', `hLocked` = '%d', `hAlarm` = '%d', `hMoney` = '%d', `hMaconha` = '%d', `hMaterial` = '%d', `FHQ` = '%d' WHERE `hID` = '%i'", HouseInfo[houseid][hType], HouseInfo[houseid][hOwner], HouseInfo[houseid][hOutPosX], HouseInfo[houseid][hOutPosY], HouseInfo[houseid][hOutPosZ], HouseInfo[houseid][hLocked], HouseInfo[houseid][hAlarm], HouseInfo[houseid][hMoney], HouseInfo[houseid][hMaconha], HouseInfo[houseid][hMaterial], HouseInfo[houseid][FHQ], houseid); mysql_pquery(ConnectMYSQL, query); } } |