Author Topic: Errors when using ULib.ucl.registerAccess  (Read 1999 times)

0 Members and 1 Guest are viewing this topic.

Offline Liquid Obsidian

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Errors when using ULib.ucl.registerAccess
« on: March 01, 2015, 05:50:43 PM »
CODE:
Code: [Select]
if SERVER then
timer.Simple(1, function()
ULib.ucl.registerAccess("pickupothers_props", "admin", "Permission to pickup players props", "Liquid Obsidian" )
ULib.ucl.registerAccess("pickupothers_vehicles", "admin", "Permission to pickup players vehicles", "Liquid Obsidian" )
end)
end

I have pinpointed that this section of the code is causing 2 of the same errors everytime a player joins, or is assigned any kind of ULX rank or permission.

It happens to other players but not me?

ERROR:
Code: [Select]
[ERROR] lua/includes/extensions/table.lua:51: bad argument #1 to 'pairs' (table expected, got nil)
  1. pairs - [C]:-1
   2. Empty - lua/includes/extensions/table.lua:51
    3. fn - addons/ulx/lua/ulx/modules/cl/xgui_client.lua:421
     4. func - addons/ulib/lua/ulib/client/cl_util.lua:22
      5. unknown - lua/includes/modules/net.lua:32

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Errors when using ULib.ucl.registerAccess
« Reply #1 on: March 01, 2015, 07:50:27 PM »
Are you running _latest_ code from our Github? If not, make sure you update.

I also question your example codeblock actually being problem point, as that code only runs in 'server', but, all errors indicate client side issues and or files. (cl_init, xgui_client )
« Last Edit: March 01, 2015, 07:57:38 PM by JamminR »
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Errors when using ULib.ucl.registerAccess
« Reply #2 on: March 05, 2015, 07:32:07 PM »
Hmm, that is a very odd error indeed. Nothing jumps out at me as being a possible cause, even when looking through the relevant code chunks. Since you're erroring on the XGUI data passing, I'll ask Stickly Man (the XGUI developer) to take a look.
Experiencing God's grace one day at a time.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Errors when using ULib.ucl.registerAccess
« Reply #3 on: March 07, 2015, 05:50:07 PM »
Talked to Liquid Obsidian on steam- he said this issue was resolved. It was caused by FAdmin interfering with the permission libraries or something.

However, I think that unrelated lua error is some kind of race condition with how XGUI handles server->client data, so I've gone ahead and pushed a symptom fix that should at least prevent any major errors in the future.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Errors when using ULib.ucl.registerAccess
« Reply #4 on: March 07, 2015, 07:30:39 PM »
Thank you Stickly Man!
And, imagine that, Another admin mod causing a conflict that we specifically ask people not to combine admin mods.
We've NOTHING against other admin mods.
Many just conflict. Too many cooks in the kitchen trying to share the same ingredients.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming