MYSQL help
#1

These codes does not insert anything from my database but there is not a single error on the log

Код:
CMD:dmicreate(playerid, params[])
{
	foreach(new x : DMI)
	{
		if(DMIInfo[x][dmiCreated] == 0)
		{
			new Float:dX, Float:dY, Float:dZ, string[1000];
			GetPlayerPos(playerid, dX, dY, dZ);
			format(string, sizeof(string), "ID %d is created", x);
			SendClientMessage(playerid, X11_WHITE, string);

			DMIInfo[x][dmiID] = x;
			DMIInfo[x][dmiModel] = 1;
			DMIInfo[x][dmiColor] = 0;
			DMIInfo[x][dmiVirtualWorld] = GetPlayerVirtualWorld(playerid);
			DMIInfo[x][dmiInterior] = GetPlayerInterior(playerid);
			DMIInfo[x][dmiPosX] = dZ;
			DMIInfo[x][dmiPosY] = dY;
			DMIInfo[x][dmiPosZ] = dX;
			DMIInfo[x][dmiCreated] = 1;

			format(string, sizeof(string), "INSERT INTO mapicons (ID, VW, Interior, PosX, PosY, PosZ, Created) VALUES (%d, %d, %d, %0.2f, %0.2f, %0.2f, 1)", x, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), dX, dY, dZ);
			mysql_pquery(MySQLConnection, string, "", "", "");
			print(string);

			Iter_Add(DMI, DMIInfo[x][dmiID]);
			DMIInfo[x][dmiID] = CreateDynamicMapIcon(dX, dY, dZ, 1, 0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), -1, 1000.0);
			break;
		}
	}
	return 1;
}
Reply


Messages In This Thread
MYSQL help - by DeathKing - 24.01.2014, 10:38

Forum Jump:


Users browsing this thread: 1 Guest(s)