MySQLoo Help



local Work = mysqloo.connect(info.Host, info.User, info.Pass, info.DB, 3306)




	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


It IS connecting as I can run Work:status() and it returns 0.
I get the following error:


[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


I know its going to be something stupid! Please help!