a bit of utime help?
Seems some players are getting this error when joining..
I'm using this copy of cl_utime.lua : [url]https://github.com/Nayruden/Ulysses/blob/master/utime/lua/autorun/cl_utime.lua[/url]
[CODE][xxxxxxxx|6|STEAM_0:1:xxxxxx] Lua Error:
controlpanel.Get() - Error creating a ControlPanel!
You're calling this function too early! Call it in a hook!
[xxxxxxxx|6|STEAM_0:1:xxxxxx] Lua Error:
[ERROR] addons/utime/lua/autorun/client/cl_utime.lua:312: attempt to index local 'cpanel' (a nil value)
1. buildCP - addons/utime/lua/autorun/client/cl_utime.lua:312
2. resetCvars - addons/utime/lua/autorun/client/cl_utime.lua:307
3. fn - addons/utime/lua/autorun/client/cl_utime.lua:336
4. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
5. LocalPlayer - [C]:-1
6. ShowTeam - gamemodes/fretta/gamemode/cl_selectscreen.lua:295
7. unknown - gamemodes/fretta/gamemode/cl_init.lua:54
[xxxxxxxx|6|STEAM_0:1:xxxxxx] Lua Error:
controlpanel.Get() - Error creating a ControlPanel!
You're calling this function too early! Call it in a hook![/CODE]
Do you have ULib too?
Yes I do..
[editline]10th April 2014[/editline]
hook.lua
[CODE]
function Call( name, gm, ... )
for i = 1, #resort do
sortHooks( resort[ i ] )
end
resort = {}
-- If called from hook.Run then gm will be nil.
if gm == nil and gmod ~= nil then
gm = gmod.GetGamemode()
end
local HookTable = Hooks[ name ]
if HookTable then
local a, b, c, d, e, f
for k=1, #HookTable do
v = HookTable[ k ]
if not v then
-- Nothing
else
-- Call hook function
if isstring( v.name ) then
Line 183 a, b, c, d, e, f = v.fn( ... )
else
-- Assume it is an entity
if IsValid( v.name ) then
a, b, c, d, e, f = v.fn( v.name, ... )
else
table.insert( resort, name )
end
end
if a ~= nil then
-- Allow hooks to override return values if it's within the limits (-20 and 20 are read only)
if v.priority > -20 and v.priority < 20 then
return a, b, c, d, e, f
end
end
end
end
end
if not gm then return end
local GamemodeFunction = gm[ name ]
if not GamemodeFunction then
return
end
-- This calls the actual gamemode function - after all the hooks have had chance to override
return GamemodeFunction( gm, ... )
end
[/CODE]
[editline]10th April 2014[/editline]
Actually, can I just remove line 307 where it calls
buildCP( controlpanel.Get( "Utime" ) )
?
I don't think I need that panel anyway? (running prop hunt)
Yes, removing that line will fix the issue.
No, no no no god just no. Reinstall your UTime odds are you went fiddling around. Repost if it doesn't fix the problem. Never go through smashing comments in the code.
[QUOTE=_Jacob;44518010]No, no no no god just no. Reinstall your UTime odds are you went fiddling around. Repost if it doesn't fix the problem. Never go through smashing comments in the code.[/QUOTE]
The problem only happens for a few users. It doesn't happen for me.
I can reproduce the problem by calling utime_reset manually and the problem will happen 100% of the time the function is called.
That file is being run as-is, unedited.
I have modified the server file to use mysqloo, but that doesn't touch the panel code at all.
I've just commented out that line for now and will probably leave it that way, I think it's just crap code tbh.
Ive used it on my server and never had an error with it. Theres also really no need to use mysql with it. it just sets pdata if i remember correctly. So if you need to edit something you can just setpdata.
[QUOTE=_Jacob;44519847]Ive used it on my server and never had an error with it. Theres also really no need to use mysql with it. it just sets pdata if i remember correctly. So if you need to edit something you can just setpdata.[/QUOTE]
I never get the error, other players do; but it's not all players, and it's not all the time.
I need to use mysql because I have it running on 5 servers sharing the same table.
Sorry, you need to Log In to post a reply to this thread.