..:D&G:.. Posted January 18, 2014 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 MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
Wei Posted January 18, 2014 Posted January 18, 2014 do you have mysql = exports.mysql at the top of the code ? Diet with russian vodka, lose 3 days in one week !
..:D&G:.. Posted January 18, 2014 Author Posted January 18, 2014 Lol, no... Let me try it MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
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