ULX

Author Topic: Utime -- Show how long your players have been connected this session and total  (Read 558525 times)

0 Members and 2 Guests are viewing this topic.

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
1) Utime data is stored in sv.db of server gmod directory. Changing anything in /addons will not affect the data for utime unless you changed something we've never recommended. Same for ULib/ULX, it's stored in /data/
2) Yes, that's our master repo, and whether you originally downloaded from there or not, the path you showed, and the readme file you showed in your last post are not the same/newer data in our repo.

I can't quickly tell the full differences between 1.42 and 1.43, however, the current code on github shows Megiddo added an extra check to make sure cpanel wasn't nil, which, your error indicates it is.


I'm not guaranteeing with 100% absolute surety your error will stop. I'm just saying the latest code from github was to fix an issue like that.

I'll install the latest. Hopefully the hours logged aren't affected which I doubt they would from what you said. And as for the error, I've only seen it when I first joined after a fresh install of everything, so I doubt I'll see it again, and the only way I'll know if it continues or not is if I re-wipe my stuff. I'll just have to trust that this solves.

Thanks
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

Offline [GL]Mesud18

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
I need some help. my Utime isn't saving anyone time. It shows how long they played and then when its a new day it resets to 0. Can Anyone help me?

Offline Moka

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
I need some help. my Utime isn't saving anyone time. It shows how long they played and then when its a new day it resets to 0. Can Anyone help me?

Having the same problem on my dev server.

I had a problem where everyones time was the same until I updated ran my SteamCMD to update and ran my server again and it was fixed but no lua errors popped up for that particular problem.

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
-snip-
« Last Edit: April 12, 2015, 06:30:17 AM by Belly136 »

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
1) Utime data is stored in sv.db of server gmod directory. Changing anything in /addons will not affect the data for utime unless you changed something we've never recommended. Same for ULib/ULX, it's stored in /data/
2) Yes, that's our master repo, and whether you originally downloaded from there or not, the path you showed, and the readme file you showed in your last post are not the same/newer data in our repo.

I can't quickly tell the full differences between 1.42 and 1.43, however, the current code on github shows Megiddo added an extra check to make sure cpanel wasn't nil, which, your error indicates it is.


I'm not guaranteeing with 100% absolute surety your error will stop. I'm just saying the latest code from github was to fix an issue like that.

Installing the latest (removing the old addon and installing this one) won't effect the hours stored so far right? I'm guessing my previous time was reset due to me wiping my entire server, but wiping the addons/utime portion shouldnt effect it correct?
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]

1) Utime data is stored in sv.db of server gmod directory. Changing anything in /addons will not affect the data for utime
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
Ok so i have added

Code: [Select]
if not LocalPlayer():IsValid() or gpanel == nil or cpanel == nil then return end
Under think function in cl_utime to fix client error when client joins and i got no error 310 yet.
But i'm not sure if this is the best thing to do... Any suggestions?

Edit: Nope, still here. 2 errors for each new client.

Code: [Select]
[??????? ?? ??????|347|STEAM_0:0:49744753] Lua Error:
controlpanel.Get() - Error creating a ControlPanel!
You're calling this function too early! Call it in a hook!

[??????? ?? ??????|347|STEAM_0:0:49744753] Lua Error:

[ERROR] addons/utime/lua/autorun/cl_utime.lua:310: attempt to index local 'cpanel' (a nil value)
1. buildCP - addons/utime/lua/autorun/cl_utime.lua:310
2. resetCvars - addons/utime/lua/autorun/cl_utime.lua:305
3. fn - addons/utime/lua/autorun/cl_utime.lua:334
4. unknown - addons/ulib/lua/ulib/shared/hook.lua:179
5. LocalPlayer - [C]:-1
6. fn - addons/utime/lua/autorun/cl_utime.lua:333
7. unknown - addons/ulib/lua/ulib/shared/hook.lua:179


[??????? ?? ??????|347|STEAM_0:0:49744753] Lua Error:
controlpanel.Get() - Error creating a ControlPanel!
You're calling this function too early! Call it in a hook!

[??????? ?? ??????|347|STEAM_0:0:49744753] Lua Error:

[ERROR] addons/utime/lua/autorun/cl_utime.lua:310: attempt to index local 'cpanel' (a nil value)
1. buildCP - addons/utime/lua/autorun/cl_utime.lua:310
2. resetCvars - addons/utime/lua/autorun/cl_utime.lua:305
3. fn - addons/utime/lua/autorun/cl_utime.lua:334
4. unknown - addons/ulib/lua/ulib/shared/hook.lua:179


[??????? ?? ??????|347|STEAM_0:0:49744753] Lua Error:
controlpanel.Get() - Error creating a ControlPanel!
You're calling this function too early! Call it in a hook!

2nd edit: Fixed the error but i still have
Code: [Select]
Lua Error:
controlpanel.Get() - Error creating a ControlPanel!
You're calling this function too early! Call it in a hook!
« Last Edit: April 12, 2015, 11:26:51 AM by Belly136 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Belly, are you using version from Github, and not from the first post of this thread?
The version at our Github site should have fixed that control panel error 2 years ago. 1.43 is the version I think.
Also, you mentioned over several various posts you've tried editing on your own to prevent client side from showing.
If you DO NOT edit the code, and use the Github UTime version, do you still get errors?
Try this BEFORE deleting anything.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
No, i downloaded from here. But i think i found a fix. I deleted
Code: [Select]
buildCP( controlpanel.Get( "Utime" ) ) and that seems to have fixed the problem. I don't need control panel anyway because i'm using prop hunt. I never downloaded utime from github.
« Last Edit: April 12, 2015, 02:37:20 PM by Belly136 »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Utime from github fixes that error. It has for 2 years. Megiddo fixed it in Github Jul 27, 2013 ( https://github.com/Nayruden/Ulysses/commit/7c556b6dc094af437da44ad1ffc1508c969cc96c )
What you did will likely cause errors on client-side, even when running in a gamemode you state won't use it.

I've nothing against learning/editing one's own code to enhance/fit for own purpose.
I find it irritating to make changes that aren't necessary when a developer has already fixed them, and the same fix has been discussed several times in a thread including where to get that fix.
Especially when the choice made will likely cause error for others.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
I did that. And that only fixed gpanel but not cpanel. I was still getting

Code: [Select]
[ERROR] addons/utime/lua/autorun/cl_utime.lua:310: attempt to index local 'cpanel' (a nil value)
But i fixed that too and the only thing left was

Code: [Select]
Lua Error:
controlpanel.Get() - Error creating a ControlPanel!
You're calling this function too early! Call it in a hook!

And since i deleted 
Code: [Select]
buildCP( controlpanel.Get( "Utime" ) )

there were no more errors.

Edit: I've also completely reinstalled gmod. I used to get errors when i first joined the server after clean install but not now. And utime is working perfectly fine.
« Last Edit: April 13, 2015, 06:05:13 AM by Belly136 »

Offline CaptinCCat?? -VG -

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
I like using this ALOT, however I am wondering how would I add it so WITH a UNIQUE ID. it also adds the players STEAM ID indo the sv.db Folder
I was also wondering if there is a way to sinc the Times between multiple Servers?
« Last Edit: April 24, 2015, 10:10:43 PM by CaptinCCat?? -VG - »

Offline Belly136

  • Newbie
  • *
  • Posts: 33
  • Karma: -2
There's utime MySQL.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
There's utime MySQL.

Also knwon as utimeM, but speaking of the devil, anyone having problems with that, I also can't seem to find the forum thread for utimeM here on these forums, anyone able to assist me?
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.