Ok i was changing up createbar then when i create in game and look at my DB, it doesnt INSERT anything
pawn Код:
CMD:createbar(playerid,params[])
{
if(PlayerData[playerid][AdminLevel] < 4) return 0;
new barid = GetBarid();
new bint = GetPlayerInterior(playerid);
new bworld = GetPlayerVirtualWorld(playerid);
if(barid == 0) return SCM(playerid,red,"ERROR: You have reached the maximum ID");
GetPlayerPos(playerid,X,Y,Z);
format(str,sizeof(str),"INSERT INTO Bars (ID,PosX,PosY,PosZ,Int,World) VALUES ('%d','%f','%f','%f','%i','%i')",GetBarid(),X,Y,Z,bint,bworld);
mysql_query(str);
UnloadBar();
SetTimerEx("ReloadBar",5000,0,"i",playerid);
format(str,sizeof(str),"You have created Bar ID: %d, all bars will load in 5 seconds",barid);
SCM(playerid,orange,str);
return 1;
}
Did you enable mysql_debug? Look in the Debug.txt what error it gave (assuming you're using MySQL plugin from BlueG).
Код:
[17:22:56] CMySQLHandler::Query(INSERT INTO Bars (ID,PosX,PosY,PosZ,Int,World) VALUES ('1','0.000000','0.000000','0.000000','0','0')) - 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 'Int,World) VALUES ('1','0.000000','0.000000','0.000000','0','0')' at line 1)