Author Topic: help with a command  (Read 1707 times)

0 Members and 1 Guest are viewing this topic.

Offline TheNoobKid

  • Newbie
  • *
  • Posts: 25
  • Karma: -1
help with a command
« on: March 24, 2016, 06:44:53 AM »
Hello.

I need help with my command here, I don't have any clue how to fix this.
No errors coming up.

I want this code to place "" around the name and reason
ex: /givepoint "name" "reason" if you understand.

Quote
function ulx.givepoint( calling_ply, target_ply, reason )
   if reason and reason ~= "" then
   else
      reason = nil
   end
   ULib.queueFunctionCall( ULib.givepoint, "target_ply", "reason", calling_ply )
end
local givepoint = ulx.command( "POINTS", "ulx givepoint", ulx.givepoints, "/givepoint", true )
givepoint:addParam{ type=ULib.cmds.PlayerArg }
givepoint:addParam{ type=ULib.cmds.StringArg, hint="reason", ULib.cmds.optional, ULib.cmds.takeRestOfLine, completes=ulx.common_givepoint_reasons }
givepoint:defaultAccess( ULib.ACCESS_ADMIN )
givepoint:help( "Giv RP-Points ud :)" )

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given