Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: yahan on October 26, 2010, 09:41:48 PM
-
local function addUser( pl, res, status, err )
pl:ChatPrint("Loading " .. pl:Nick() .. "'s account \n")
print( err )
ULib.ucl.addUser( pl:Nick(), "steamid", pl:SteamID(), { res[1] } )
pl:ChatPrint("Loaded " .. pl:Nick() .. "'s rank.\n")
ULib.ucl.probe( pl )
end
local function LoadUsers( pl )
local steamID = pl:SteamID()
ULib.ucl.authed[ pl ] = nil
ULib.ucl.awaitingauth[ pl ] = nil
tmysql.query( "SELECT Rank FROM rank WHERE SteamID = '" .. steamID .. "'", addUser, nil, pl )
end
hook.Add( "PlayerInitialSpawn", "LoadUserRank", LoadUsers )
hook.Remove( "PlayerInitialSpawn", "ucl_initialspawn" )
13:40:39 Lua Error: ERROR: Hook 'LoadUserRank' Failed: [addons\ulx\lua\ulx\init.lua:79] attempt to index field 'awaitingauth' (a nil value)
13:40:39 Lua Error: Removing Hook 'LoadUserRank'
-
You never defined the awaitingauth field, so it's understandably nil.