spoty Posted May 8, 2016 Share Posted May 8, 2016 hey i need some help with this error i have tryed some stuff to fix it error line SCRIPT ERROR: drft\drft_db.lua:76: 'end' expected (to close 'if' at line 67) near '' ERROR: Loading script failed: drft\drft_db.lua:76: 'end' expected (to close 'if' at line 67) near '' here is line 66 to 79 line 2 is line 67 local check = dbPoll(dbQuery(connection, "SELECT * FROM account WHERE drift = ?",tostring(account)), -1 ); if type(check) ~= "table" and #check ~= 0 or not check then local d = check[1]; local t = fromJSON ( d["data"] ); if ( type ( t ) == "table" ) then for k, v in pairs ( t ) do setElementData ( source, k, v ); end end addEventHandler ( "onPlayerLogin", root, loadDriftPoints ) i dind have scripted for a while so it will probaly be a dumb fault of me Link to comment
Anubhav Posted May 8, 2016 Share Posted May 8, 2016 local check = dbPoll(dbQuery(connection, "SELECT * FROM account WHERE drift = ?",tostring(account)), -1 ); if type(check) ~= "table" and #check ~= 0 or not check then local d = check[1]; local t = fromJSON ( d["data"] ); if ( type ( t ) == "table" ) then for k, v in pairs ( t ) do setElementData ( source, k, v ); end end end end end addEventHandler ( "onPlayerLogin", root, loadDriftPoints ) You either have less "end" or more "end". Check. 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