19.11.2015, 14:17
(
Последний раз редактировалось vassilis; 19.11.2015 в 21:16.
)
What is wrong here?
mysql_log
function
Also i have already a column named HOwned it was named Howned by mistake but i edit it sould i remove this column and make it again?
mysql_log
pawn Код:
[15:47:52] [DEBUG] mysql_format - connection: 1, len: 350, format: "INSERT INTO `houses` (`XEnt`, `YEnt`, `ZEnt`, `XExit`, `YExit`, `ZExit`, `HVirtualWorld` ,`HInterior`, `HPrice`,`HOwner`, `HOwne..."
[15:47:52] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `houses` (`XEnt`, `YEnt`, `ZEnt`, `XExit`, `YExit`, ", callback: "(null)", format: "(null)"
[15:47:52] [DEBUG] cache_insert_id - connection: 1
[15:47:52] [WARNING] cache_insert_id - no active cache
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[350];
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);
mysql_format(mysql, query, sizeof(query), "INSERT INTO `houses` (`XEnt`, `YEnt`, `ZEnt`, `XExit`, `YExit`, `ZExit`, `HVirtualWorld` ,`HInterior`, `HPrice`,\
`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;
}