[CODE]
local Work = mysqloo.connect(info.Host, info.User, info.Pass, info.DB, 3306)
[/CODE]
[CODE]
function User_Add(Nick,SteamID,Rank,Tokens)
local q = Work:query("INSERT INTO "..tostring(info.user_table).." ( Nick, SteamID, Rank, Tokens ) VALUES ("..Nick..","..SteamID..","..Rank..","..Tokens..")")
function q:onSuccess( data )
return true
end
function q:onError( er, qu )
print("MySQL: "..tostring(er))
print("MySQL: "..tostring(qu))
return false
end
q:start()
end
[/CODE]
It IS connecting as I can run Work:status() and it returns 0.
I get the following error:
[CODE][ERROR] lua/autorun/mysql.lua:41: attempt to index local 'q' (a nil value)
1. User_Add - lua/autorun/mysql.lua:41
2. unknown - lua/autorun/mysql.lua:174
[/CODE]
I know its going to be something stupid! Please help!
Sorry, you need to Log In to post a reply to this thread.