FlyingSpoon Posted June 7, 2017 Share Posted June 7, 2017 function UserData(Status,player,userName) if Status == "success" then local query = dbQuery(connection, "SELECT * FROM forum_userpanel WHERE BINARY playerUser=?", userName) local result, numrows, errmsg = dbPoll (query, 1) local row = result[1] if row then setElementData(player,"getForumName",userName) setElementData(player,"loggedin",true) outputDebugString("[Forum] "..userName.." has logged in!") else cr = dbQuery(serverContainer.connection, "INSERT INTO forum_userpanel (playerUser) VALUES (?)", userName) outputDebugString("[Forum] "..userName.." has been activated!") end end end Line 5: attempt to index local 'result' (a nil value) Keeps giving me that error on - 'local row = result[1]' - Any ideas? 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