07.01.2019, 17:12
Hello, i found a house system tutorial and now i have some errors.:
Tutorial: https://forum.sa-mp.com/showthread.p...ighlight=house
Errors:
Код:
CreateHouse("House 1", 35000 -3724.7620, -1651.9816, 4.4582, 442.8380, 508.8443, 1000.3121, 1, 25000);//1795
Код:
stock CreateHouse(const HouseName[], CostP, Float:EnterX, Float:EnterY, Float:EnterZ, Float:TeleX, Float:TeleY, Float:TeleZ, Interiorx, SellP)
{
format(nInfo[houseid][namo_pav], 100, "%s", HouseName);
nInfo[houseid][pirkimoverte] = CostP;
nInfo[houseid][EnterPos][0] = EnterX;
nInfo[houseid][EnterPos][1] = EnterY;
nInfo[houseid][EnterPos][2] = EnterZ;
nInfo[houseid][TelePos][0] = TeleX;
nInfo[houseid][TelePos][1] = TeleY;
nInfo[houseid][TelePos][2] = TeleZ;
nInfo[houseid][pardavimoverte] = SellP;
nInfo[houseid][interjeras] = Interiorx;
new query[100];
format(query, sizeof(query), "SELECT `savininko_vardas` FROM `namas` WHERE `namo_pav` = '%s'", HouseName); //Formats the SELECT query
mysql_tquery(manomysql, query, "", "");
new num_rows;
cache_get_row_count(num_rows);
if(num_rows != 0) cache_get_value_name(manomysql, "savininko_vardas", nInfo[houseid][savininko_vardas], MAX_PLAYER_NAME);//1748
nInfo[houseid][checkpointidx][0] = CreateDynamicCP(EnterX, EnterY, EnterZ, 1.0);
//CreateDynamicCP(Float:x, Float:y, Float:z, Float:size);
nInfo[houseid][checkpointidx][1] = CreateDynamicCP(TeleX, TeleY, TeleZ, 1.0, 15500000+houseid, Interiorx);
//CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid, interiorid);
if(!nInfo[houseid][savininko_vardas][0]) format(query, sizeof(query), "Namas: %s \n Namo vertė:%d \n Pardavimo vertė: %d", HouseName, CostP, SellP);
//If there is nothing in the owners variable, we check if the first cell doesn't have a character.
else if(nInfo[houseid][savininko_vardas][0] != 0) format(query, sizeof(query), "Namas: %s \n Savininkas: %s", HouseName, nInfo[houseid][savininko_vardas]);
//If there is something in the owners variable we check if the first cell has a character.
nInfo[houseid][textid] = CreateDynamic3DTextLabel(query, 0xFFFFFF, EnterX, EnterY, EnterZ + 0.5, 50.0);
//CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
houseid ++; //We go to the next free slot in our variable.
return 1;
}
Errors:
Quote:
|
(1748 ) : warning 213: tag mismatch: expected tag none ("_"), but found "MySQL" (1795) : warning 213: tag mismatch: expected tag none ("_"), but found "Float" (1795) : warning 202: number of arguments does not match definition |



: warning 213: tag mismatch: expected tag none ("_"), but found "MySQL"