1. Code:
    (18:10:32) | Web request callback raised an exception (NullReferenceException: Object reference not set to an instance of an object)
    (18:10:32) | 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.PlayRustLastNews.APIResponse (Int32 code, System.String response, System.String apiType, Int32 numberCheck) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.PlayRustLastNews+<CheckWebsite>c__AnonStorey0.<>m__0 (Int32 code, System.String response) [0x00000] in <filename unknown>:0 
    [DOUBLEPOST=1509729802][/DOUBLEPOST]Changing rust.BroadcastChat(message) to rust.BroadcastChat(null,message) fixed it
     
  2. Whats happend with my plugin?


    [Error] Failed to call hook 'OnPlayerChat' on plugin 'PlayerCount v1.0.99' (NullReferenceException: Object reference not set to an instance of an object)
    18:50 [Stacktrace] 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.PlayerCount.OnPlayerChat (.Arg arg) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.PlayerCount.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
     
  3. Did you get any solution on this?
    I tried to compare notifier with deathnotes to find any clue, how i can fix this, but i don't know :/
     
  4. Wulf

    Wulf Community Admin

  5. i am still confused as i do not know anything about coding. can someone fix my Notifier so that its messages dont show the prefix code like in the screenshot i have attached.
    thanks in advance to whoever does this or helps me out :)
     

    Attached Files:

    Last edited by a moderator: Nov 3, 2017
  6. Please, help me for Notifier SkinN.
    After this update I could not update more
    sorry for my English
     
    Last edited by a moderator: Nov 4, 2017
  7. @Wulf Could you explain how this code works? and what is the null for?

    Code:
    rust.SendChatMessage(player, SimpleColorFormat(null, "<silver>" + msg + "<end>"), profile);
     
  8. The line adds a message in chat for the specific player. It makes the message text silver. The "profile" is the string version of the users Id, this adds the image in chat.


    The "Null" is a reference to the message prefix. So if you wanted to send a message like its coming from a player, you would pass the player's name there.
    However, if you pass Null it just ignores the prefix and puts the message in chat.

    Personally I just use:
    Code:
    player.SendConsoleCommand("chat.add", userId, message, 1.0);
    as rust.SendChatMessage breaks your parameters down and passes them into SendConsoleCommand.
     
  9. Wulf

    Wulf Community Admin

    Yeah, I’m surprised so many plugins used the “rust.” helpers, as they were only added for non-C# plugins pretty much.
     
  10. can anyone that understands coding help me fix this?
     
  11. @Wulf with what Can I change the RestrictedInventory because I'm getting this error RestirectedInventory could not be found are you missing a reference?
     
  12. Wulf

    Wulf Community Admin

    Please create a new thread with details on what you are looking for, because from what I can tell your question is unrelated to this thread.