16.03.2013, 14:07
(
Последний раз редактировалось dusk; 16.03.2013 в 17:19.
)
The first problem.
Code:
Error:
And another problem:
Error:
The thing with this is I want to add "Preke" +1,but Preke is an item that players choose from a list. So i can not know which one do i need to add to.
Code:
pawn Код:
new query[128], labelstring[126];
format(labelstring,sizeof(labelstring),"Namas Parduodamas \n Kaina:%d \nNoredamas pirkti rasyk /buyhouse",HousePrice);
format(query,sizeof(query),"INSERT INTO houses (VirtualWorld,PosX,PosY,PosZ,Price,HouseLabel) VALUES (%d,%f,%f,%f,%d,%s)",GetPlayerVirtualWorld(playerid),x,y,z,HousePrice,labelstring);
mysql_query(query);
pawn Код:
[16:24:25] CMySQLHandler::Query(INSERT INTO houses (VirtualWorld,PosX,PosY,PosZ,Price,HouseLabel) VALUES (0,-205.562133,1032.921630,19.945363,420,Namas Parduod) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Parduod' at line 1)
And another problem:
pawn Код:
PlayerDrugs[playerid][Preke]+=1;
pawn Код:
C:\Users\Justas\Desktop\testserver 0.3x\gamemodes\rp.pwn(3251) : error 033: array must be indexed (variable "Preke")