Ramsey Posted January 18, 2018 Share Posted January 18, 2018 Hi everbody! There is an error in the system I built and the debug window repeats continuously. /debugscript 3 said: Database Result Uncolllected After 5 Minutes Error! ( customS.lua:54 ) Codes: Spoiler addEvent("removeTemplate",true) addEventHandler("removeTemplate",root,function(player,dbid) if dbQuery(connection,"DELETE FROM inttemplates WHERE dim=?",getElementDimension(player)) then dbExec(connection, "UPDATE interiors SET fee = ? WHERE id = ?",0,getElementDimension(player)) loadOneInteriorWhereID(getElementDimension(player)) for k, v in ipairs(getElementsByType("object")) do if getElementDimension(v) == getElementDimension(player) then destroyElement(v) triggerClientEvent(player,"send->template",player,"nothing") dbQuery(connection,"DELETE FROM intobjects WHERE dim=?",getElementDimension(player)) end end for k,v in ipairs(getElementsByType("marker")) do if getElementData(v,"doorMarker") then if getElementDimension(v) == getElementDimension(player) then destroyElement(v) end end end end Link to comment
DRW Posted January 18, 2018 Share Posted January 18, 2018 (edited) Always use dbFree() after every dbQuery() function. local query = dbQUery() dbFree (query) Edited January 18, 2018 by MadnessReloaded Link to comment
Ramsey Posted January 18, 2018 Author Share Posted January 18, 2018 Thanks i will try it. 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