BigDaddy Posted August 23, 2015 Share Posted August 23, 2015 What's Problem here ? debugscript : ERROR: Mute\Ms.lua:24: Database query failed: unrecognized token: ''')'' addEventHandler('onResourceStart',resourceRoot, function ( ) local CreateNewTable = executeSQLQuery ('CREATE TABLE IF NOT EXISTS `Mute` ( PlayerSerial,Date,Name,By,Reason ) ') if ( CreateNewTable ) then outputDebugString('Create [ Mute ] DataBase done .') end end ) addEvent("executeSQLQuery:INSERT",true) addEventHandler('executeSQLQuery:INSERT',root, function ( Name,Reason,By ) local Serial = getPlayerSerial(Name) local time = getRealTime() local hours = time.hour local minutes = time.minute local days = time.monthday local months = time.month local years = time.year local second = time.second local isdsts = time.timestamp local Date_Time = " [ "..days.." / "..months.." / "..years.." "..hours..":"..minutes.." : ".. second .." ] " local Results = executeSQLQuery("SELECT * FROM `Mute` WHERE PlayerSerial=?",Serial ) if ( type ( Results ) == "table" and #Results == 0 or not Results ) then executeSQLQuery ( "INSERT INTO `Mute` ( PlayerSerial,Date,Name,By,Reason ) VALUES(?,?,?,?,?)",tostring(Serial),tostring(Date_Time),tostring(By),tostring(Reason)) else outputChatBox("*ERROR : This Serial Is Already Added Inside DataBase Mute Serial .",source,255,0,0,true) end end ) Link to comment
JR10 Posted August 23, 2015 Share Posted August 23, 2015 You're missing one column's value. Line 24: executeSQLQuery ( "INSERT INTO `Mute` ( PlayerSerial,Date,Name,By,Reason ) VALUES(?,?,?,?,?)",tostring(Serial),tostring(Date_Time),tostring(Name),tostring(By),tostring(Reason)) Link to comment
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