1. Hey, I used to put custom chat logo with rust.broadcastChat.
    but since somes rust updates, this is not working anymore with hooks errors.
    What's the new hook now? thanks for help
     
  2. Wulf

    Wulf Community Admin

    Could you provide those errors please? That also is not a hook, it's a helper method intended for non-C# plugins. The method itself has not changed though.
     
  3. Code:
    Failed to call hook 'OnServerCommand' on plugin 'BetterSay v2.0.3' (NullReferenceException: Object reference not set to an instance of an object)   at Oxide.Core.Libraries.Covalence.Formatter+Lexer.Lex (System.String text) [0x00000] in <filename unknown>:0   at Oxide.Core.Libraries.Covalence.Formatter.Parse (System.String text) [0x00000] in <filename unknown>:0   at Oxide.Core.Libraries.Covalence.Formatter.ToTreeFormat (System.String text, System.Collections.Generic.Dictionary`2 translations) [0x00000] in <filename unknown>:0   at Oxide.Core.Libraries.Covalence.Formatter.ToUnity (System.String text) [0x00000] in <filename unknown>:0   at Oxide.Game.Rust.Libraries.Server.Broadcast (System.String message, System.String prefix, UInt64 userId, System.Object[] args) [0x00000] in <filename unknown>:0   at Oxide.Game.Rust.Libraries.Rust.BroadcastChat (System.String name, System.String message, System.String userId) [0x00000] in <filename unknown>:0   at Oxide.Plugins.BetterSay.OnServerCommand (.Arg arg) [0x00000] in <filename unknown>:0   at Oxide.Plugins.BetterSay.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0   at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0   at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0   at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
    Its the same for another plugin I use custom rust.broadcastChat with avatar
     
    Last edited by a moderator: Dec 10, 2017
  4. Wulf

    Wulf Community Admin

    That would be from the plugin sending a prefix and no message. Pretty sure that specific plugin was already updated though to send the message properly. If you aren't sending a prefix. then you should be using null for that part of the method.
    Code:
    rust.BroadcastChat(null, "message");
     
  5. By exemple I'm using
    Smooth Restarter
    The plugin was updated BUT, its still do these error, I don't know what to do in this case
     
  6. Wulf

    Wulf Community Admin

    If the plugin is erroring, it'd be best to report it in the plugin's support thread. I've given an example above with how to resolve the error.
     
  7. The plugin works if I don't use custom avatar.
    It's only if I use the custom rustbroadcastChat on all plugins like better say, easyvote, smoothrestarter, etc... Before it's worked well...
     
  8. Wulf

    Wulf Community Admin

    The format has not changed. You can see the complete format here: Oxide.Rust/Rust.cs at develop · OxideMod/Oxide.Rust · GitHub