nasserdfdd Posted June 29, 2019 Share Posted June 29, 2019 hi everyone i'm having this issue if any one can help pls function() local check = exports.sql:exec("SELECT * FROM sys" ) local check2 = exports.sql:query("SELECT * FROM pos" ) if #check ~= #AreaPosition then for i=1,#AreaPosition do exports.sql:query("INSERT INTO sys (asd, id1, id2, alloy, alloy2, spawn) VALUES(?,?,?,?,?,?)", "asd["..tostring(i).."]", "", "", 0, 0, "NO") end end if #check2 ~= #AreaPosition then for i=1,#AreaPosition do exports.sql:query("INSERT INTO pos (asd,X,Y,Z,SizeX,SizeY) VALUES(?,?,?,?,?,?)", "asd["..tostring(i).."]", AreaPosition[i]["aPosX"], AreaPosition[i]["aPosY"], AreaPosition[i]["aSizeX"], AreaPosition[i]["aSizeY"]) end end end error attempt to get length of local 'check' a boolean value thanks in advance Link to comment
DNL291 Posted June 29, 2019 Share Posted June 29, 2019 This means that at line 2 it isn't returning what it should (table), but a boolean (true/false). There's probably something wrong with the database. 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