ULX

Author Topic: ulx.adduserid throwing errors  (Read 1546 times)

0 Members and 1 Guest are viewing this topic.

Offline Sproncker

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
ulx.adduserid throwing errors
« on: November 15, 2013, 04:00:17 PM »


took me a while to pinpoint adduserid being the error, and it's throwing this error of which I cannot seem to solve, it only seems to like the usergroup as a number, where it's saved in my database as a string, likewise with the steamID

this error

is thrown

which leads to



and I can't really make any sense of what's going on anywhere in the log file.
Any assistance would be greatly appreciated.
« Last Edit: November 15, 2013, 04:15:09 PM by Sproncker »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: ulx.adduserid throwing errors
« Reply #1 on: November 15, 2013, 04:39:27 PM »
There are two issues here.

First, you really shouldn't be calling ulx.adduserid for your use case (I understand this works for a lot of people for their needs, but it was not something I designed around); instead, call ULib.ucl.addUser. Or if you really want to keep using the ULX command, call it from console using RunConsoleCommand.

Second, which directly addresses your problem, you're passing nil to calling_ply which would never be nil under normal circumstances (the server console is simply an invalid entity). I haven't actually verified this is the issue, but I'm fairly confident it is.
Experiencing God's grace one day at a time.