Ulx command help

Hello, so I am attempting to make my first ulx command. I have it placed in the /modules/sh directory of ulx but it doesn’t appear in xgui when I restart the server.


local CATEGORY_NAME = "Job Ranks"

function ulx.givexp( calling_ply, target_plys, amt )
    local affected_plys = {}


    for i = 1, #target_plys do
        local v = target_plys*
        if not v:IsValid() then
            print("This is not a valid player!")
        else
    calling_ply:ConCommand( "jobranks_addpt" .. target_plys .. amt  )
    end
end
    ulx.fancyLogAdmin( calling_ply, true, "#A gave #s", affected_plys, amt, "#A xp! #s" )
end


local givexp = ulx.command( CATEGORY_NAME, "ulx givexp", ulx.ulxgivexp, "!givexp" )
givexp:addParam{ type=ULib.cmds.PlayersArg }
givexp:addParam{ type=ULib.cmds.NumArg, min=0, default=0, hint="xp", ULib.cmds.optional, ULib.cmds.round }
givexp:defaultAccess( ULib.ACCESS_ADMIN )
givexp:help( "Gives XP to players!" )

Basically I’m trying to add ulx support for a script I have. I know I could ask the dev to add it but I would rather take the oppurtunity to learn! The intended purpose is to run the “jobranks_addpt” command through the calling players console. Any advice is appreciated and thank you in advanced!:slight_smile:

EDIT: I seem to only realize my mistakes after I put myself in an embarrassing situation lol