- 0
Eroare baza de date
-
Similar Content
-
- 0 replies
- 25 views
-
baza de date
By tyur21a,
- 3 answers
- 244 views
-
- 0 replies
- 92 views
-
- 5 replies
- 1,091 views
-
- 5 replies
- 2,506 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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;
}
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.