Closed Timmy closed 7 years ago
cmds.PlayerArg
cmds.PlayersArg
cmds.optional
-- lua/ulib/modules/test.lua local test = ULib.cmds.TranslateCommand( "test", print ) test:addParam{ type=ULib.cmds.PlayerArg, ULib.cmds.optional } test:defaultAccess( ULib.ACCESS_ALL )
The command executes.
The following error gets thrown:
[ERROR] addons/ulib/lua/ulib/shared/player.lua:121: Tried to use a NULL entity! 1. indexFn - [C]:-1 2. getUniqueIDForPlayer - addons/ulib/lua/ulib/shared/player.lua:121 3. parseAndValidate - addons/ulib/lua/ulib/shared/commands.lua:515 4. __fn - addons/ulib/lua/ulib/shared/commands.lua:916 5. execute - addons/ulib/lua/ulib/shared/commands.lua:1323 6. unknown - addons/ulib/lua/ulib/shared/commands.lua:1351 7. unknown - lua/includes/modules/concommand.lua:54
ULib v2.63d (03/21/17) ULX v3.73d (03/21/17)
Steps to reproduce
cmds.PlayerArg
orcmds.PlayersArg
as ancmds.optional
argument.Expected behavior
The command executes.
Actual behavior
The following error gets thrown:
Version
ULib v2.63d (03/21/17) ULX v3.73d (03/21/17)