- 0
Eroare baza de date
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
TheGodfather
Primesc aceasta eroare in logurile serverului:
[20:26:47] ====================================================================
[20:26:47] Error ID: 1064, Eroare: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '10/01/2021 - 20:26:47', '9', '78.97.185.115')' at line 1
[20:26:47] Callback:
[20:26:47] gQuery: INSERT INTO `logs` (`Userid`, `Text`, `Date`, `Type`, `IP`) VALUES ('144', '(chat) date ca te duc eu unde mere'', '10/01/2021 - 20:26:47', '9', '78.97.185.115')
[20:26:47] ====================================================================
Functie de inserare este aceasta:
function InsertLog(playerid, text[], type) {
new
szQuery[1024], szDate[180], Year, Month, Day, Hour, Minute, Second, ip[180];
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
GetPlayerIp(playerid, ip, sizeof(ip));
format(szDate, sizeof(szDate), "%02d/%02d/%d - %02d:%02d:%02d", Day, Month, Year, Hour, Minute, Second);
mysql_format(SQL, szQuery, sizeof(szQuery), "INSERT INTO `logs` (`Userid`, `Text`, `Date`, `Type`, `IP`) VALUES ('%d', '%s', '%s', '%d', '%s')", PlayerInfo[playerid][pSQLID], text, szDate, type, ip);
mysql_tquery(SQL, szQuery, "", "");
return true;
}
Am cautat prin gamemode acel (chat) si am gasit la onplayertext:
if(PaintType[playerid] != 0) format(string, sizeof(string), "{5088BF}%s [%d kills]: {FFFFFF}%s", GetNameEx(playerid), PKills[playerid], text);
else if(PlayerInfo[playerid][pColor] != 0) format(string, sizeof(string), "{%s}%s: {FFFFFF}%s", PlayerColors(PlayerInfo[playerid][pColor]), GetNameEx(playerid), text);
else format(string, sizeof(string), "{%s}%s: {FFFFFF}%s", PlayerInfo[playerid][pHelper] >= 1 || PlayerInfo[playerid][pAdmin] >= 1 && GetPVarInt(playerid, "Cover") != 1 ? ("BA0404") : ("AFAFAF"), GetNameEx(playerid), text);
if(PaintType[playerid] != 0) {
SendPaintMessage(PaintType[playerid], -1, string);
return false;
}
ProxDetector(20.0, playerid, string,COLOR_WHITE);
format(string, sizeof(string), "(chat) %s", text);
ChatLog(GetName(playerid), playerid, string);
format(string, sizeof(string), "\"%s\"", text);
SetPlayerChatBubble(playerid, text, COLOR_CHATBUBBLE, 10.0, 10000);
return false;
Functia ChatLog este urmatoarea:
function ChatLog(player[], userid, text[]) {
InsertLog(userid, text, LOG_CHAT);
return true;
}
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now