1. Code:
    18:40 [Info] (INFO): IcyNads ran /help
    18:40 [Error] Failed to call hook 'OnHammerHit' on plugin 'rustyremovetool v1.0.0'
    File: rustyremovetool.lua Line: 253 attempt to call method 'Destroy' (a string value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <filename unknown>:0
      at NLua.LuaFunction.Call (System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.OnCallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    18:40 [Error] Failed to call hook 'OnHammerHit' on plugin 'rustyremovetool v1.0.0'
    File: rustyremovetool.lua Line: 253 attempt to call method 'Destroy' (a string value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <filename unknown>:0
      at NLua.LuaFunction.Call (System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.OnCallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    18:40 [Info] (ADMIN): Attempting to retrieve .#SiN!! Steam Hours...
    18:40 [Info] (INFO): Updated .#SiN!! Steam Rust Hours with -1 hours.
    18:40 [Info] (DEBUG:GLItCH): [6ix] Nigro => Rich Chigga (2193.5598189091)
    18:40 [Error] Failed to call hook 'OnHammerHit' on plugin 'rustyremovetool v1.0.0'
    File: rustyremovetool.lua Line: 253 attempt to call method 'Destroy' (a string value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <filename unknown>:0
      at NLua.LuaFunction.Call (System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.OnCallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    18:40 [Info] (DEBUG:GLItCH): [6ix] Nigro => Rich Chigga (2191.536394062)
    18:40 [Error] Failed to call hook 'OnHammerHit' on plugin 'rustyremovetool v1.0.0'
    File: rustyremovetool.lua Line: 253 attempt to call method 'Destroy' (a string value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <filename unknown>:0
      at NLua.LuaFunction.Call (System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.OnCallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    18:40 [Info] (DEBUG:GLItCH): [6ix] Nigro => Rich Chigga (2190.5491609894)
    18:40 [Info] (INFO): [AIMBOT] Broderick redeemed basic kit.
    18:40 [Info] (DEBUG:GLItCH): [6ix] Nigro => Rich Chigga (2190.0353777156)
    18:40 [Info] (CHAT): :mad:: community is cancer
    18:40 [Info] (CHAT): IcyNads: sethome 1
    18:40 [Info] (DEBUG:GLItCH): [6ix] Nigro => Rich Chigga (2189.8823204632)
    18:40 [Info] (INFO): Im a Lava Lamp redeemed basic kit.
    18:40 [Error] Failed to call hook 'OnHammerHit' on plugin 'rustyremovetool v1.0.0'
    File: rustyremovetool.lua Line: 253 attempt to call method 'Destroy' (a string value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <filename unknown>:0
      at NLua.LuaFunction.Call (System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.OnCallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    18:40 [Info] (DEBUG:GLItCH): [6ix] Nigro => Rich Chigga (2189.9833185664)
    18:40 [Info] (DEBUG:GLItCH): [6ix] Nigro => Rich Chigga (2190.2750853854)
    18:40 [Info] (CHAT): :mad:: game is cancer
    18:40 [Info] (CHAT): :mad:: gg
    18:40 [Warning] Calling 'OnLootEntity' on 'QuickSort v1.0.1' took 344ms [GARBAGE COLLECT]
    18:40 [Error] Failed to call hook 'cmdremove' on plugin 'rustyremovetool v1.0.0'
    File: rustyremovetool.lua Line: 41 attempt to call method 'Destroy' (a string value):
      at NLua.Lua.ThrowExceptionFromError (Int32 oldTop) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args, System.Type[] returnTypes) [0x00000] in <filename unknown>:0
      at NLua.Lua.CallFunction (System.Object function, System.Object[] args) [0x00000] in <filename unknown>:0
      at NLua.LuaFunction.Call (System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Ext.Lua.Plugins.LuaPlugin.OnCallHook (System.String hookname, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 
    [DOUBLEPOST=1469759048][/DOUBLEPOST]if self.Timers[sid] ~= nil then self.Timers[sid]:Destroy() end < -- destroy timer, started after todays update
     
    Last edited by a moderator: Jul 29, 2016
  2. Wulf

    Wulf Community Admin

    Your issue is mentioned in the error, you should be passing a Timer, not a string to Destroy(). The error is not from anything changed in the updates today, it's with your code.
     
  3. I havent changed that plugin in over 5 weeks..started today after update.
    [DOUBLEPOST=1469759688][/DOUBLEPOST]
    Code:
    function PLUGIN:cmdremove( player,command, arg )
     
     
      local sid = rust.UserIDFromPlayer(player)
     
      if removeTable.Users[sid] ~= nil then
       
        player:ChatMessage("Remove Tool is: <color=lime>OFF</color>" )
       
       
       
       
        removeTable.Users[sid] = nil
        if self.Timers[sid] ~= nil then self.Timers[sid]:Destroy() end
        return
      end
     
     
     
      player:ChatMessage("Remove Tool is: <color=yellow>ON</color>, hit objects/structures with a Hammer to remove them, tool will disable itself after 30 seconds of inactivity." )
      removeTable.Users[sid] = player
      global.Effect.server.Run.methodarray[3]:Invoke(nil, util.TableToArray( { "assets/bundled/prefabs/fx/weapons/landmine/landmine_trigger.prefab", player.transform.position, UnityEngine.Vector3.get_up(), nil, true } ) )   
      self.Timers[sid] = timer.Once(30, function()    
          global.Effect.server.Run.methodarray[3]:Invoke(nil, util.TableToArray( { "assets/bundled/prefabs/fx/weapons/landmine/landmine_trigger.prefab", player.transform.position, UnityEngine.Vector3.get_up(), nil, true } ) )     
          player:ChatMessage("Remove Tool is: <color=lime>OFF</color>" )
          --rust.SendChatMessage( removeTable.Users[sid], "Rusty",
       
          removeTable.Users[sid] = nil
      end,self.Plugin)
     
     end
     
  4. Wulf

    Wulf Community Admin

    Timers working just fine in Lua:
    Code:
    PLUGIN.Title = "TimerTest"
    PLUGIN.Version = V(0, 1, 0)
    PLUGIN.Description = ""
    PLUGIN.Author = "Wulf/lukespragg"local myTimer = nilfunction PLUGIN:Init()
        local i = 1
        myTimer = timer.Repeat(1, 0, function()
            print("Timer interval: " .. i)
            i = i + 1
        end, self.Plugin)
    endfunction PLUGIN:Unload()
        if myTimer ~= nil then
            myTimer:Destroy()
            print("Timer destroyed!")
        end
    end
    7c9ddb0abaf12f27c08045259df6fe38.png
     
  5. I would like to believe that. That plugin has been the same for 5 weeks. Ill let you figure it out. <3
     
  6. Wulf

    Wulf Community Admin

    There's nothing for me to figure out, I just gave you a working example of creating and destroying timers in Lua. It's not on our end.
     
  7. Proofed, what Wulf mentioned. Its not on Oxide's end... There's nothing to get figured out :p
     
  8. k. i guess im an ah who doesnt kno what hes talking bout.
    [DOUBLEPOST=1469762631][/DOUBLEPOST]Fuji: i reworked ur plugin, complete with weights. wasnt that hard.
    [DOUBLEPOST=1469763621][/DOUBLEPOST]Cool, explai
    n why it isnt working today. i didnt make any modifications in over a month.
    [DOUBLEPOST=1469763790][/DOUBLEPOST]f0rum is broke too lol Gyazo - b565b874d1ccf5345aced0171d017dc5.png
    [DOUBLEPOST=1469764009][/DOUBLEPOST]ill do everyone a favor. im out.
     
  9. Your error is in a place you didn't post.
    The error is pretty clear and there is no way this issue can be caused by Oxide (that would mean that the error itself is incorrect).
    There is also no way for timer.Once to return a string, as you can see in the source code (C# is a statically typed language - it wouldn't even pass the build process!).
    It's a lot more likely that some user caused an invariant with a malicious input in your code, resulting in a string being added to the table, which isn't that unlikely in a dynamically typed language like Lua, or that you didn't consider some case where concurrency matters, and the error is the result of a race condition.
    The timer library hasn't changed since the 9th of June, which is quite a lot longer than your described five weeks.
    Proof: Oxide/Timer.cs at develop · OxideMod/Oxide · GitHub

    Also, on a side note, attacking people passive-agressively will not help with your issue.
     
  10. Ok thanks, sorry for being rude. This is the code that used to work before last update, and now it isnt, any help would be appreciated.
    Code:
        global.ConsoleNetwork.BroadcastToAllClients("ddraw.text", 60, System.ConsoleColor.Lime, pos, "<color=lime>" .. "X" .. "</color>")
     
  11. Wulf

    Wulf Community Admin

    The ddraw.text command is broken in Rust, they will need to fix it. This isn't related to timers though.
     
  12. Any alternatives to ddraw right now? I was able to resolve the timers issue..
     
  13. Wulf

    Wulf Community Admin

    Not for drawing text, what do you need it for?
     
  14. Just need an X drawn on players screen (all players) on a certain world vector3 var (pos)
    [DOUBLEPOST=1469845356][/DOUBLEPOST]I dont mind waiting if theres going to a fix soon, what i dont want to do is cycle through all players to apply it. ZERO priority.
     
  15. You reworked what?
     
  16. Yes..total pain. But i got it working.
    [DOUBLEPOST=1469845554][/DOUBLEPOST]@Wulf if theres an easy way for me to broadcasttoall using a box or any other kind of marker i would be all set, doesnt need to be an X . could be a real small rectangle.
     
  17. Wulf

    Wulf Community Admin

    Yes, take a look at my Inbound plugin. There are other ddraw commands that work just fine right now.
     
  18. I see, is arrow the only ddraw method working right now for broadcasttoall?
     
  19. Wulf

    Wulf Community Admin

    I haven't tried the others, but you can test them if you'd like. You can find the others either in the game's DLL or by using the 'find ddraw' command in Rust.
     
  20. I will. Thanks for putting up with me. And again beaucoup apologies for my not so manly posts at times.