ULX

Author Topic: [ERROR] Need help debugging!  (Read 3662 times)

0 Members and 1 Guest are viewing this topic.

Offline SinkingV

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
[ERROR] Need help debugging!
« on: December 24, 2014, 03:59:01 PM »
I'm new to lua coding and I've been looking and trying for days to figure out this error.

[ERROR] addons/ulx/lua/ulx/modules/sh/sourcebans2.lua:5: function arguments expected near 'calling_ply'
  1. unknown - addons/ulx/lua/ulx/modules/sh/sourcebans2.lua:0

I have function arguments at line 5 where the error is but I keep getting this.

Code: [Select]
local CATEGORY_NAME = "sourcebans"

function ulx.bancheck( calling_ply, target_ply )
local sID = target_ply:SteamID
calling_ply:SendLua([[gui.OpenURL("http://gflclan.com/gmodbans/index.php?p=banlist&advSearch=" .. sID .. "&advType=steamid")]])

end


local bancheck = ulx.command(CATEGORY_NAME, "bancheck", ulx.bancheck, "!bancheck", true)
bancheck:addParam{ type=ULib.cmds.PlayerArg }
bancheck:defaultAccess(ULib.ACCESS_ALL)
bancheck:help( "Opens SourceBans to check a player's bans" );

Any ideas or suggestions? I've gotten the link to open before but I'm not sure what I've broken.

An Error Has Occurred!

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