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
Solved Rust.BroadcastChat not working anymore
Discussion in 'Rust Development' started by ĿĒØ.ҒЯ, Dec 10, 2017.
-
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.
-
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
Last edited by a moderator: Dec 10, 2017 -
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");
-
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 -
Wulf Community Admin
-
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... -
Wulf Community Admin