Author Topic: TempAdd (v2.4) - Add a user to another group for a set amount of time  (Read 43759 times)

0 Members and 1 Guest are viewing this topic.

Offline TheChris812

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Bug with custom groups
« Reply #135 on: August 08, 2017, 08:00:58 AM »
I have a bug where I can't tempadd someone to a group that I made myself for example VIP. This is what I get:

[ERROR] addons/ulx_tempadduser/lua/ulx/modules/sh/ulxtempuser.lua:166: Group does not exist for adding user to (vip)
  1. tempfuncadd - [C]:-1
   2. addUser - addons/ulx-v3_73/lua/ulx/xgui/server/sv_groups.lua:47
    3. call - addons/ulx_tempadduser/lua/ulx/modules/sh/ulxtempuser.lua:166
     4. __fn - addons/ulib-v2_63/lua/ulib/shared/commands.lua:943
      5. execute - addons/ulib-v2_63/lua/ulib/shared/commands.lua:1323
       6. unknown - addons/ulib-v2_63/lua/ulib/shared/commands.lua:1351
        7. Run - lua/includes/modules/concommand.lua:54
         8. unknown - addons/ulib-v2_63/lua/ulib/shared/commands.lua:1365
          9. unknown - lua/includes/modules/concommand.lua:54

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2544
  • Karma: 390
    • View Profile
    • |G4P| Gman4President
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #136 on: August 08, 2017, 08:20:00 AM »
Make sure your groups are all lower case.

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 668
  • Karma: 33
    • View Profile
    • iViscosity Gaming
Re: TempAdd (v2.4) - Add a user to another group for a set amount of time
« Reply #137 on: August 09, 2017, 12:04:40 PM »
Code: Lua
  1. function ulx.PeriodicExpirationCheck()
  2.  
  3.         if CLIENT then return end
  4.  
  5.         for _, pl in pairs (player.GetAll()) do
  6.                 if not IsValid(pl) then continue end
  7.                 if pl:IsConnected() then
  8.                         ulx.CheckExpiration( pl )
  9.                 end
  10.         end
  11.        
  12. end
  13. timer.Create( "ulx_periodicexpirationcheck", 3600, 0, ulx.PeriodicExpirationCheck )

I saw a link to this post and I was looking through the code and your updates on here and found that you said that code above checks every player every 30 minutes. I'd just like to point out that 3,600 seconds is 1 hour. There are 1800 seconds in 30 minutes :). Not a breaking change or anything, I think it's just me :P
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord
Teamspeak

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.