27.02.2017, 20:24
(
Последний раз редактировалось Phone; 01.03.2017 в 21:40.
)
@removido.
stock SaveHouses(aHouseID)
{
new Query[1024];
mysql_format(RpgDataDB, Query, sizeof(Query), "UPDATE `CASAS` SET `CasaExiste`='%d', `DonoCasa`=%s, `PrecoCasa`=%d, `housePos0`=%.3f, `housePos1`=%.3f, `housePos2`=%.3f, `housePos3`=%.3f, `houseInt0`=%.3f, `houseInt1`=%.3f, `houseInt2`=%.3f, `houseInt3`=%.3f, `houseInterior`=%d, `houseExterior`=%d, `houseExteriorVW`=%d, `CasaTrancada`=%d, WHERE `HouseIDH`='%d'",
aHouseInfo[aHouseID][CasaExiste],
aHouseInfo[aHouseID][DonoCasa],
aHouseInfo[aHouseID][PrecoCasa],
aHouseInfo[aHouseID][housePos0],
aHouseInfo[aHouseID][housePos1],
aHouseInfo[aHouseID][housePos2],
aHouseInfo[aHouseID][housePos3],
aHouseInfo[aHouseID][houseInt0],
aHouseInfo[aHouseID][houseInt1],
aHouseInfo[aHouseID][houseInt2],
aHouseInfo[aHouseID][houseInt3],
aHouseInfo[aHouseID][houseInterior],
aHouseInfo[aHouseID][houseExterior],
aHouseInfo[aHouseID][houseExteriorVW],
// coloque aqui a variavel que tem o valor de casa trancada ou nгo
aHouseInfo[aHouseID][HouseIDH]);
mysql_tquery(RpgDataDB, Query,"DadosaHouseInfo","d", aHouseID);
return 1;
}
PHP код:
|
[19:19:59] [WARNING] cache_insert_id - no active cache
[19:20:17] [ERROR] CMySQLQuery::Execute[DadosCasa] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `HouseIDH`=0' at line 1
[19:20:37] [WARNING] cache_insert_id - no active cache
[19:20:39] [ERROR] CMySQLQuery::Execute[DadosCasa] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `HouseIDH`=0' at line 1
Troca isso: `HouseIDH`=0' Por isso: `HouseIDH`='0'
Й erro na sintaxe, tenta colocar
Код:
Troca isso: `HouseIDH`=0' Por isso: `HouseIDH`='0' |
[00:10:25] [WARNING] cache_insert_id - no active cache
[00:10:27] [ERROR] CMySQLQuery::Execute[DadosCasa] - (error #1054) Unknown column 'Phone' in 'field list'
[00:10:31] [WARNING] cache_insert_id - no active cache
[00:10:32] [ERROR] CMySQLQuery::Execute[DadosCasa] - (error #1054) Unknown column 'Phone' in 'field list'
CMD:comprarcasa(playerid, params[])
{
new aHouseFreeSlot;
aHouseFreeSlot = aHouseFree(playerid);
if (aHouseFreeSlot != -1)
{
if (aHouseInfo[aHouseFreeSlot][aHouseDono][0] != '\0') return SendClientMessage(playerid, -1, "casa Ocupada");
if (aHouseInfo[aHouseFreeSlot][aHousePreco] > GetPlayerMoney(playerid)) return SendClientMessage(playerid, -1, "sem money");
format(aHouseInfo[aHouseFreeSlot][aHouseDono], MAX_PLAYER_NAME, hName(playerid));
aHouseUPDATE(aHouseFreeSlot);
SaveHouses(aHouseFreeSlot);
GivePlayerMoneyEx(playerid, -aHouseInfo[aHouseFreeSlot][aHousePreco]);
GameTextForPlayer(playerid, "~y~Propriedade adiquirida", 1000, 0);
SendClientMessageToAllEx(Amarelo, "%s, Comprou a casa numero %d, Localizado em %s.", hName(playerid),aHouseFreeSlot,ReturnPlayerZone(playerid));
}
return 1;
}