• Print

Author Topic: sv_groups error!  (Read 3772 times)

0 Members and 1 Guest are viewing this topic.

Offline Beach

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
sv_groups error!
« on: October 29, 2015, 04:02:49 pm »
I am having an issue with setting users to groups and ulx sometimes dosent respond when I try to remove a group or update a group.
The console error:

Code: Lua
  1. [ERROR] addons/ulx/lua/ulx/xgui/server/sv_groups.lua:241: bad argument #1 to 'ipairs' (table expected, got nil)
  2.   1. ipairs - [C]:-1
  3.    2. resetAllPlayerValues - addons/ulx/lua/ulx/xgui/server/sv_groups.lua:241
  4.     3. addUser - addons/ulx/lua/ulx/xgui/server/sv_groups.lua:46
  5.      4. call - addons/ulx/lua/ulx/modules/sh/user.lua:57
  6.       5. __fn - addons/ulib/lua/ulib/shared/commands.lua:942
  7.        6. unknown - addons/ulib/lua/ulib/shared/commands.lua:1295
  8.         7. unknown - lua/includes/modules/concommand.lua:54
  9.  

The function inside of sv_groups.lua

Code: Lua
  1.         function groups.resetAllPlayerValues( ply )
  2.                 for _, team in ipairs( ulx.teams ) do                           --Loop through each team
  3.                         for _, group in ipairs( team.groups ) do                --Loop through each group per team
  4.                                 if group == ply:GetUserGroup() then                     --Have we found our team associated with this players group?
  5.                                         local resettable = {}
  6.                                         for modifier, _ in pairs( team ) do     --Good! Now go reset the UTeam params based on the current team.
  7.                                                 if modifier ~= "order" and modifier ~= "index" and modifier ~= "groups" and modifier ~= "name" and modifier ~= "color" then
  8.                                                         table.insert( resettable, modifier )
  9.                                                 end
  10.                                         end
  11.                                         groups.resetPlayerValue( ply, resettable )
  12.                                         break
  13.                                 end
  14.                         end
  15.                 end
  16.         end

I do not have uteam if that matters.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: sv_groups error!
« Reply #1 on: October 30, 2015, 10:27:24 am »
I will look into this when I have a moment. Just to check, are you running the latest version of ULX and ULib from our GitHub page?

UTeam is bundled with ULX/ULib, and has been for some time, but it only is activated on Sandbox. Which gamemode are you running?

Does this happen every time you update/remove a group, or only sometimes? Can you see if it only happens when you update/remove a group that has existing players in it?
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Beach

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: sv_groups error!
« Reply #2 on: October 30, 2015, 04:31:50 pm »
I have the latest versions of everything ulysses except uteam becuase I do not use it. This problem only happens when I try to move myself to a different group.
I am using excl jailbreak 7 for gamemode

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: sv_groups error!
« Reply #3 on: November 07, 2015, 05:15:58 pm »
I'm not quite sure what was exactly causing your problem, but I think I've got a fix in place that should stop it from causing an error:
https://github.com/Nayruden/Ulysses/commit/f215d719a5b5131e4a2c4f76ca280211dc2f4400

Since you're not on Sandbox, UTeam shouldn't be functioning at all, so update to the latest version from our GitHub page, and let me know if it fixed your problem.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Beach

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: sv_groups error!
« Reply #4 on: November 07, 2015, 05:39:18 pm »
Fixed. Updated everything including uteam/ulx/ulib.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: sv_groups error!
« Reply #5 on: November 07, 2015, 07:02:09 pm »
Uteam is part of ULX now.. you don't need the separate download/addons folder... delete it if you included it.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print