BetterChat

Moved

Total Downloads: 26,200 - First Release: Apr 21, 2015 - Last Update: Jan 12, 2018

4.9898/5, 98 likes
  1. Wulf

    Wulf Community Admin

    Wulf updated Better Chat with a new update entry:

    4.2.10

     
  2. I installed the new one
    and I still having this error sometimes:

    Code:
    (14:49:39) | [Oxide] 14:49 [Error] Failed to call hook 'API_FindPlayerPrimaryGroup' on plugin 'BetterChat v4.2.10' (NullReferenceException: Object reference not set to an instance of an object)
    (14:49:39) | [Oxide] 14:49 [Debug]   at Oxide.Plugins.BetterChat+Group.GetGroups (System.String SteamID, Sorting sorting) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.BetterChat+Group.GetPrimaryGroup (System.String steamID) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.BetterChat.API_FindPlayerPrimaryGroup (System.String id) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.BetterChat.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (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 name, System.Object[] args) [0x00000] in <filename unknown>:0
     
  3. chat sags, what to do?
     
  4. Sags? What do you mean?
    Can you provide some more information, if it's possible? About what game we are talking, for example?
    You are expirience chat freezez, right? Are you the server owner, or you are buying a host somewhere?
    Is it possible that this problem is coused by low memory or something?
    The answer to your questtion - provide as much information as you can.
     
  5. rust update. bug report
    Code:
    [10/21/2016 04:38:47] [Oxide] 04:38 [Error] Error while compiling BetterChat.cs(1478,52): error CS1061: Type `Oxide.Core.Libraries.Covalence.IPlayerManager' does not contain a definition for `GetAllPlayers' and no extension method `GetAllPlayers' of type `Oxide.Core.Libraries.Covalence.IPlayerManager' could be found. Are you missing an assembly reference?
     
  6. Wulf

    Wulf Community Admin

    Update the plugin, you're outdated.
     
  7. oops. Thanks! wulf
     
  8. Try using the attached file - Should be working.
     
  9. Wulf

    Wulf Community Admin

    An official update was already posted yesterday.
     
  10. can confirm still working after todays patch :)
     
  11. Wulf

    Wulf Community Admin

    It was updated for today's patch yesterday. ;)
     
  12. Our console is spammed with 30 of these, every time a player speaks:

    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')
    [Oxide] 18:11 [Warning] Duplicate permission registered 'betterchat.group.default' (by plugin 'Better Chat')

    Tried switching to an older version, after deleting everything, and get this:

    [Oxide] 6:13 PM [Warning] Waiting for another application to stop using script: BetterChat
    [Oxide] 18:13 [Debug] Load requested for plugin which is already loading: BetterChat
    [Oxide] 18:13 [Error] BetterChat plugin failed to compile!
    [Oxide] 18:13 [Error] BetterChat.cs(1478,52): error CS1061: Type `Oxide.Core.Libraries.Covalence.IPlayerManager' does not contain a definition for `GetAllPlayers' and no extension method `GetAllPlayers' of type `Oxide.Core.Libraries.Covalence.IPlayerManager' could be found. Are you missing an assembly reference?

    Can't seem to get rid of it, no matter what I try. Any thoughts?
    Edit: Reset the server, now it won't load at all - keeps giving the same above error, even after deleting the .cs file, the config, the lang, and the date files/directories.
     
    Last edited by a moderator: Oct 21, 2016
  13. Wulf

    Wulf Community Admin

    Old versions would be outdated for the update today. I'm not sure what the duplicate permission is from, but it wasn't from the update.
     
  14. @Wulf the warning comes from the part of the script that starts with [Command
    sample
    Code:
    [Command("unmuteglobal", "global.unmuteglobal"), Permission("betterchat.mute")]
            void cmdUnmuteGlobal(IPlayer player, string cmd, string[] args)
    The post above that is something different
     
  15. Wulf

    Wulf Community Admin

    Ahh, okay, so @LaserHydra, you'd just need to remove global.unmuteglobal. I'll post an update for it.
     
  16. Wulf

    Wulf Community Admin

    Wulf updated Better Chat with a new update entry:

    4.2.11

     
  17. Same happens to the TimedExecute plugin line 138 if you want to update that as well
     
  18. Code:
    (18:18:57) | [Oxide] 18:18 [Error] Failed to initialize plugin 'BetterChat v4.2.11' (InvalidCastException: Cannot cast from source type to destination type.)
    (18:18:57) | [Oxide] 18:18 [Debug] at Oxide.Game.Rust.Libraries.Covalence.RustPlayerManager.get_Connected () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.BetterChat.Loaded () [0x00000] in <filename unknown>:0
    at Oxide.Plugins.BetterChat.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
    at Oxide.Plugins.CSharpPlugin.InvokeMethod (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.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0
    (18:18:57) | [Oxide] 18:18 [Info] Unloaded plugin Better Chat v4.2.11 by LaserHydra
    (18:18:57) | [Oxide] 18:18 [Info] No previous version to rollback plugin: BetterChat
     
    Last edited by a moderator: Oct 21, 2016
  19. Getting the exact same thing atm just updated to the new version.
    [Error] Failed to initialize plugin 'BetterChat 4.2.11' (InvalidCastException: Cannot cast from source type to destination type)
     
    Last edited by a moderator: Oct 21, 2016
  20. Yep, I'm getting the same error as MeatCircus, tried removing my Groups.json and BetterChat.json and reloading the plugin (I unloaded it before removing the files), but same error. Here it is in a code strip:

    Code:
    [Oxide] 12:55 [Info] Loaded plugin Better Chat v4.2.11 by LaserHydra
    [Oxide] 12:55 [Warning] [Better Chat] Generating new config file...
    [Oxide] 12:55 [Error] Failed to initialize plugin 'BetterChat v4.2.11' (InvalidCastException: Cannot cast from source type to destination type.)
    [Oxide] 12:55 [Debug]   at Oxide.Game.Rust.Libraries.Covalence.RustPlayerManager.get_Connected () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.BetterChat.Loaded () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.BetterChat.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (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.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x00000] in <filename unknown>:0
    [Oxide] 12:55 [Info] Unloaded plugin Better Chat v4.2.11 by LaserHydra
    [Oxide] 12:55 [Info] No previous version to rollback plugin: BetterChat
    I had a look in the Loaded method and placed in some Puts lines, like this:
    Code:
            void Loaded()
            {
                Plugin = this;
                Puts("1");
                LoadData(ref Groups, "BetterChat/Groups");
                LoadData(ref fixedDefaultGroup, "BetterChat/DefaultGroupFixed");
                Puts("2");
                LoadMessages();
                LoadConfig();
                Puts("3");
                if (Groups.Count == 0)
                    Group.AddGroup(new Group());
                Puts("4");
                foreach (IPlayer player in players.Connected)
                    OnUserInit(player);
                Puts("5");
                if (!fixedDefaultGroup)
                {
                    Group playerGroup = Groups.Find((g) => g.GroupName == "player");
                Puts("6");
                    if (playerGroup != null)
                    {
                        playerGroup.GroupName = "default";
                        SaveData(Groups, "BetterChat/Groups");
                    }
                Puts("7");
                    fixedDefaultGroup = true;
                    SaveData(fixedDefaultGroup, "BetterChat/DefaultGroupFixed");
                }
                Puts("8");
                //PrintWarning("Normal: " + string.Join(Environment.NewLine, (from g in Group.GetAllGroups(Group.Sorting.Normal) select $"{g.Priority}: {g.GroupName}").ToArray()));
                //PrintWarning("Reversed: " + string.Join(Environment.NewLine, (from g in Group.GetAllGroups(Group.Sorting.Reversed) select $"{g.Priority}: {g.GroupName}").ToArray()));
                Puts("9");
            }
    And can see that it prints up to 4, meaning the error is in this line:
    Code:
                foreach (IPlayer player in players.Connected)
                    OnUserInit(player);
    EDIT: For some reason players.Connected really doesn't want to work. players.All doesn't work either. Is this a bug in Oxide?
     
    Last edited by a moderator: Oct 21, 2016