Hello,
So I created a custom ULX command, quite a few actually, and I'm having one of the strangest issues I've ever encountered. For some reason one of my commands pops up with an error (saying target_ply is a nil value). I have assigned it with the PlayerArg. But to fix it I have to open the file and press save. Then it runs perfectly fine. All the other commands in this file work fine and I wrote them in the exact same way. Anyone have any suggestions or help? I can't really open the file and save it every time..
Here is the format I used for the command which does not work.
function ulx.supercoolcommand(calling_ply,target_ply)
target_ply:SendLua([[RunConsoleCommand("super_cool_command")]])
ulx.fancyLogAdmin( calling_ply, "#A did something super cool to #T", target_ply )
end
local supercoolcommand = ulx.command("Some Super Cool Stuff", "ulx supercoolcommand", ulx.supercoolcommand, "!supercoolcommand")
supercoolcommand:addParam{ type=ULib.cmds.PlayerArg }
supercoolcommand:defaultAccess( ULib.ACCESS_ADMIN )
supercoolcommand:help( "Does something super cool." )