19.11.2015, 21:11

PHP код:
[18:48:38] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[18:48:38] [ERROR] CMySQLQuery::Execute[] - (error #1054) Unknown column 'HOwned' in 'field list'
[18:48:38] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
[18:48:38] [DEBUG] Calling callback "OnQueryError"..
createhouse function
PHP код:
function CreateHouse(Float:Xen,Float:Yen,Float:Zen,Float:Xex,Float:Yex,Float:Zex,virtualworld,interiorid,price)
{
static hCount;
new hid = hCount; hCount += 1;
new string[100];
new query[500];
hid += 1;
HouseInfo[hid][XEnt] = Xen;
HouseInfo[hid][YEnt] = Yen;
HouseInfo[hid][ZEnt] = Zen;
HouseInfo[hid][XExit] = Xex;
HouseInfo[hid][YExit] = Yex;
HouseInfo[hid][ZExit] = Zex;
HouseInfo[hid][HVirtualWorld] = virtualworld;
HouseInfo[hid][HInterior] = interiorid;
HouseInfo[hid][HPrice] = price;
HouseInfo[hid][HOwned] = 0;
HouseInfo[hid][HLocked] = 0;
format(string,sizeof(string),""COL_GREEN"HouseName"COL_WHITE": No Owner\n"COL_GREEN"Price"COL_WHITE": %d",price);
Create3DTextLabel(string, COLOR_YELLOW, Xen, Yen, Zen, 40.0, 0, 0);
strcat(query,"INSERT INTO `houses` (`XEnt`, `YEnt`, `ZEnt`, `XExit`, `YExit`, `ZExit`, `HVirtualWorld` ,`HInterior`, `HPrice`");
format(query, "%s, `HOwner`, `HOwned`, `HLocked`, `HName`) VALUES (%d, %d, %d, %d, %d, %d, %d, %d, %d, 'UnOwned', 0, 0, 'For Sale')",Xen,Yen,Zen,Xex,Yex,Zex,virtualworld,interiorid,price);
mysql_tquery(mysql, query);
HouseInfo[hid][hID] = cache_insert_id();
printf("New house registered. HID: %d", HouseInfo[hid][hID]); //just for debugging.
return 1;
}


