General > Developers Corner

ulx.adduserid throwing errors

(1/1)

Sproncker:


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.

Megiddo:
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.

Navigation

[0] Message Index

Go to full version