..:D&G:.. Posted January 18, 2014 Share Posted January 18, 2014 Hello, I am trying to make a gui to display the admin info, but I keep getting that error (from the title). addEvent("showAdminStats",true) addEventHandler("showAdminStats",getRootElement(), function( player ) local result = mysql:query( "SELECT username, admin, lastlogin, adminreports FROM accounts WHERE admin != 0 AND admin < 10 ORDER BY admin DESC, username ASC" ) if result then local t = { } while true do local row = mysql:fetch_assoc( result ) if row then table.insert(t, { row.username, tonumber(row.admin), row.adminreports, row.lastlogin }) else break end end mysql:free_result( result ) setElementData(player,"adminStats",t) end end) The error is at line 4 Link to comment
Wei Posted January 18, 2014 Share Posted January 18, 2014 do you have mysql = exports.mysql at the top of the code ? Link to comment
..:D&G:.. Posted January 18, 2014 Author Share Posted January 18, 2014 Lol, no... Let me 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