1. Hello, hopefully this is the last post I need to make for this beast is underway

    With the following code:

    Code:
    function PLUGIN:CheckServerCommands()
    local url = 'http://localhost/rcon.php'
    local first = true
    local command = false
    local args = falsewebrequests.EnqueueGet(    url, function(code, response)
        for part in string.gmatch(response, '([^:]+)') do
            if first then
                command = part
            else
               args = part
            end
                first = false
        end    if not command then return end
        if not args then args = "" end    rust.RunServerCommand(command, args)end, self.Object)end
    
    I am unable to access rust.RunServerCommand(command, args) due to the following error?:
    Code:
    attempt to call field 'RunServerCommand' (a nil value)
    I can beat around the bush by making it only limited to specific commands then change them with global.* = 'new value' but was hoping for a more condensed approach.
     
    Last edited by a moderator: Feb 6, 2015
  2. Wulf

    Wulf Community Admin

    That isn't a hook, it is a Rust library function. I use it, so I know it works. It is likely that you are either outdated or there is something you are doing in your code that is messing with it.
     
  3. Probably outdated, if you have only added the RunServerCommand in the passed week :p
     
  4. Wulf

    Wulf Community Admin

    Yup. ;)