1. after todays update Notifier is putting out some errors in console, i know Notifier is out dated however ive kept it because it still works to what i need it to. however this is the error that im getting now:
    Code:
    Failed to run a 300.00 timer in 'Notifier v3.1.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) [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.Notifier.Say (System.String msg, System.String profile, Boolean usePrefix) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.AdvertsLoop () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.<Loaded>m__1 () [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00000] in <filename unknown>:0 
    and this
    Code:
    Failed to call hook 'OnPlayerInit' on plugin 'Notifier v3.1.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) [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.Notifier.Say (System.String msg, System.String profile, Boolean usePrefix) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.JoinMessages (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.InitializePlayer (.BasePlayer player, Boolean joined) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.OnPlayerInit (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.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
    any help with this would be appreciated :)
     
  2. i installed a new oxide and i have a problem
    with
    Code:
    rust.SendChatMessage(player, SimpleColorFormat("<silver>" + msg + "<end>"), null, profile);
    May you tell me what i must to change
    i read a wulf
    but i don't understand what i must to change
    Notable changes:
    If you have any C# plugins using rust.SendChatMessage or rust.Broadcast and are sending a null message instead of a prefix, they'll likely error. I'd encourage updating to Server.Broadcast or Server.Message instead, as the "rust." library helpers are slated to be removed eventually.
     
  3. Wulf

    Wulf Community Admin

    You are sending the message as the prefix when you should be sending it as the message with that null is.
     
  4. i am a usual user may you show me what i must change for example here
    Code:
                if (!String.IsNullOrEmpty(PluginPrefix) && EnablePluginPrefix && usePrefix)
                    msg = PluginPrefix + " " + msg;
                if (profile == "0" && EnablePluginIcon)
                    profile = IconProfile;
                rust.SendChatMessage(player, SimpleColorFormat("<silver>" + msg + "<end>"), null, profile);
     
  5. How to update to Server.Message in this code

    Code:
    BasePlayer currentPlayer = current.GetBasePlayer();                    if (currentPlayer != null)
                            rust.SendChatMessage(currentPlayer, Group.Format(player, message), null, player.Id);
     
  6. Wulf

    Wulf Community Admin

    Server.Broadcast for all, Player.Message for a single player Message.
     
  7. @W
    method signatures are same?
     
  8. I'm getting

    Code:
     `Oxide.Plugins.BetterChat.Player' does not contain a definition for `Message'
     
  9. so how would i fix my issues with Notifier Wulf?
     
    Last edited by a moderator: Nov 2, 2017
  10. Wulf

    Wulf Community Admin

    The many methods that work for chat sending:

    Rust-specific methods:
    • rust.SendChatMessage(BasePlayer player, string prefix, string message) - If you don't want a prefix, it needs to be null; do not make the message null.
    • rust.BroadcastChat(string prefix, string message) - If you don't want a prefix, it needs to be null; do not make the message null.
    • Player.Message(BasePlayer player, string message, string prefix, ulong id) - If you don't want a prefix, it needs to be null; do not make the message null. The prefix and id are optional.
    • Server.Broadcast(string message, string prefix, ulong id) - If you don't want a prefix, it needs to be null; do not make the message null. The prefix and id are optional.
    • PrintToChat(BasePlayer player, string message, object[] args) - args being optional if you have none.
    • PrintToChat(string message, object[] args) - args being optional if you have none.
    • SendReply(ConsoleSystem.Arg arg, string message, object[] args) - args being optional if you have none.
    • SendReply(BasePlayer player, string message, object[] args) - args being optional if you have none.
    Universal/Covalence methods as a CovalencePlugin:
    • player.Message(IPlayer player, string message)
    • player.Message(IPlayer player, string message, object[] args)
    • player.Reply(IPlayer player, string message)
    • player.Reply(IPlayer player, string message, object[] args)
    • server.Broadcast(string message)
    Universal/Covalence methods as a RustPlugin (or other game *Plugin types):
    • covalence.Player.Message(IPlayer player, string message)
    • covalence.Player.Message(IPlayer player, string message, object[] args)
    • covalence.Player.Reply(IPlayer player, string message)
    • covalence.Player.Reply(IPlayer player, string message, object[] args)
    • covalence.Server.Broadcast(string message)
    The issue from the update is that some plugins were sending the message as the prefix and then sending null for the message.
     
  11. after fix plugin work on a 70% but don't work welcome message
    Code:
     Failed to call hook 'OnPlayerInit' on plugin 'Notifier v3.1.3' (NullReferenceException: Object reference not set to an instance of an object)
    (13:59:23) | 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) [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.Notifier.Say (System.String msg, System.String profile, Boolean usePrefix) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.JoinMessages (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.InitializePlayer (.BasePlayer player, Boolean joined) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.OnPlayerInit (.BasePlayer player) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.Notifier.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
     
  12. 1 man helped me with a fix
    Just change
    in your plugin
    Code:
            private void Say(string msg, string profile = "0", bool usePrefix = true)
            {
                Con(msg);
                string prefix = null;
                if (!String.IsNullOrEmpty(PluginPrefix) && EnablePluginPrefix && usePrefix)
                    //msg = PluginPrefix + " " + msg;
                    prefix = PluginPrefix;
                if (profile == "0" && EnablePluginIcon)
                    profile = IconProfile;
                //rust.BroadcastChat(SimpleColorFormat("<silver>" + msg + "<end>"), null, profile);
                Server.Broadcast(SimpleColorFormat("<silver>" + msg + "<end>", false), prefix, 0);
            }        private void Tell(BasePlayer player, string msg, string profile = "0", bool usePrefix = true)
            {
                if (!String.IsNullOrEmpty(PluginPrefix) && EnablePluginPrefix && usePrefix)
                    msg = PluginPrefix + " " + msg;
                if (profile == "0" && EnablePluginIcon)
                    profile = IconProfile;
                //rust.SendChatMessage(player, SimpleColorFormat("<silver>" + msg + "<end>"), null, profile);
                PrintToChat(player, SimpleColorFormat("<silver>" + msg + "<end>"));
     
  13. do i just need to find that within the plugin and just replace it?
     
  14. find SendChatMessage and you will found all
     
  15. do i just copy the code in your message and replace it all in the file?
     
  16. Yes you can
     
  17. cheers thank you, will try it now
    [DOUBLEPOST=1509712500][/DOUBLEPOST]now i am getting this when someone joins/leaves my server? any ideas, sorry about all this i dont really know anything about coding
     

    Attached Files:

  18. Wulf

    Wulf Community Admin

    rust.BroadcastChat(SimpleColorFormat(null, "<silver>" + msg + "<end>"), profile);

    and

    rust.SendChatMessage(player, SimpleColorFormat(null, "<silver>" + msg + "<end>"), profile);

    Newer methods were not required, just the right order or arguments.
     
  19. sorry i dont understand, how to i fix the issue i am getting up the messages from Notifier within the screen shot i added in my last message?