mysql error...
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
The message you posted is cut so we don't know where in the code the error is near at.

What will also help is to print the query, like after the mysql_query function:
pawn Код:
print(Uzklausa);
copy it from the server log and post it with the whole error message.
Quote:

[16:06:34] CMySQLHandler::Query(INSERT INTO `logai` (data,vardas,logas) VALUES ('2015-4-24 16:6:34', 'Harry_Jones', '[gRPG.pwn]: Sistema iљmetė Harry_Jones uћ ) - 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 ''[gRPG.pwn]: Sistema iљmetė Harry_Jones uћ' at line 1)

code:

Quote:

public OnPlayerUpdate(playerid)
{
new string[128], zVardas[MAX_PLAYER_NAME], data[6], logudata[50], Uzklausa[128], logas[300];
new ginklas = GetPlayerWeapon(playerid);
GetPlayerName(playerid, zVardas, sizeof(zVardas));
getdate(data[0], data[1], data[2]);
gettime(data[3], data[4], data[5]);
if(ginklas == 16 || ginklas == 18 || ginklas == 26 || ginklas == 28 || ginklas == 32 || ginklas == 33 || ginklas == 35 || ginklas == 36 || ginklas == 37 || ginklas == 38 || ginklas == 39 || ginklas == 40 || ginklas == 44 || ginklas == 45)
{
format(string, sizeof(string), "[ANTICHEAT]: {FF8040}%s buvo iљmestas uћ neleistinus ginklus! (Ginklo ID: %i)", zVardas, ginklas);
SendClientMessageToAll(0xFF8080FF, string);
SetTimerEx("KickEx", 100, false, "i", playerid);
format(logudata, sizeof(logudata), "%0.2d-%0.2d-%0.2d %0.2d:%0.2d:%0.2d", data[0], data[1], data[2], data[3], data[4], data[5]);
format(logas, sizeof(logas), "[gRPG.pwn]: Sistema iљmetė %s uћ neleistinus ginklus! (Ginklo ID: %i)", zVardas, ginklas);
format(Uzklausa, sizeof(Uzklausa), "INSERT INTO `logai` (data,vardas,logas) VALUES ('%s', '%s', '%s')", logudata, zVardas, logas);
printf(logas);
mysql_query(Uzklausa);
return 1;
}
return 1;
}

Reply


Messages In This Thread
mysql error... - by HJones - 24.04.2015, 12:29
Re: mysql error... - by Konstantinos - 24.04.2015, 12:43
Re: mysql error... - by HJones - 24.04.2015, 13:01
Re: mysql error... - by Konstantinos - 24.04.2015, 13:11
Re: mysql error... - by HJones - 24.04.2015, 13:55

Forum Jump:


Users browsing this thread: 1 Guest(s)