InvalidOperationException at DoWhitelistError

Hello, error in the console

Failed to call hook 'OnBetterChat' on plugin 'BetterChatFilter v1.6.2' (InvalidOperationException: Sequence contains no elements)
  at System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Oxide.Plugins.BetterChatFilter.DoWhiteList (System.String word) [0x00000] in <194a818422574a4d829ebd5c8e0471bf>:0
at Oxide.Plugins.BetterChatFilter.FilterText (Oxide.Core.Libraries.Covalence.IPlayer player, System.String original) [0x00032] in <194a818422574a4d829ebd5c8e0471bf>:0
at Oxide.Plugins.BetterChatFilter.Filter (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00066] in <194a818422574a4d829ebd5c8e0471bf>:0
at Oxide.Plugins.BetterChatFilter.OnBetterChat (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00000] in <194a818422574a4d829ebd5c8e0471bf>:0
at Oxide.Plugins.BetterChatFilter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0004e] in <194a818422574a4d829ebd5c8e0471bf>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <0fbce81d88d64454b3e7abb24df7026b>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <0fbce81d88d64454b3e7abb24df7026b>:0

pls supply you config file

one problem i see is you frases cant have spaces

 "#X Ray",

Understood thanks

Failed to call hook 'OnBetterChat' on plugin 'BetterChatFilter v1.6.2' (InvalidOperationException: Sequence contains no elements)
  at System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at Oxide.Plugins.BetterChatFilter.DoWhiteList (System.String word) [0x00000] in <a43b08d7d71f49e699a71b5f97626794>:0
at Oxide.Plugins.BetterChatFilter.FilterText (Oxide.Core.Libraries.Covalence.IPlayer player, System.String original) [0x00032] in <a43b08d7d71f49e699a71b5f97626794>:0
at Oxide.Plugins.BetterChatFilter.Filter (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00066] in <a43b08d7d71f49e699a71b5f97626794>:0
at Oxide.Plugins.BetterChatFilter.OnBetterChat (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00000] in <a43b08d7d71f49e699a71b5f97626794>:0
at Oxide.Plugins.BetterChatFilter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0004e] in <a43b08d7d71f49e699a71b5f97626794>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <9882f28dc2204b4dba514a9ad18f5042>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <9882f28dc2204b4dba514a9ad18f5042>:0

Supply config file

mmmmm ok ill have to look into this anything specific happen at the time like what was the chat that triggered this. if you can give me few min before and after of console output

this error appears when they write to the chat

Merged post

08:11 [Info] [Corpse Location] ♂K@MÎK@Dz€♂ (76561############) died at (-791.2, 4.5, -1514.3)
08:12 [Info] [Raidable Bases] ExpertBase13 @ F4 : 0 items
08:12 [Info] Постройка успешно вставлена
08:12 [Info] [Better Chat] [Global] *Шамрай* 76561############ 08:12:24.0679546: куплю бензопилу
08:12 [Error] Failed to call hook 'OnBetterChat' on plugin 'BetterChatFilter v1.6.2' (InvalidOperationException: Sequence contains no elements)
at System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0

at Oxide.Plugins.BetterChatFilter.DoWhiteList (System.String word) [0x00000] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.FilterText (Oxide.Core.Libraries.Covalence.IPlayer player, System.String original) [0x00032] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.Filter (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00066] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.OnBetterChat (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00000] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0004e] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <9882f28dc2204b4dba514a9ad18f5042>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <9882f28dc2204b4dba514a9ad18f5042>:0

08:12 [Info] [Better Chat] [Global] [Evil] ♂K@MÎK@Dz€♂ 76561############ 08:12:46.4810265: ТЫ серьозно? ))
08:12 [Info] [Better Chat] [Global] *Шамрай* 76561############ 08:12:49.2187062: да
08:12 [Info] [Raidable Bases] ExpertBase9 @ P4 : 0 items
08:12 [Info] [Better Chat] [Global] [Evil] ♂K@MÎK@Dz€♂ 76561############ 08:12:56.3316875: потом дам
08:13 [Error] Failed to call hook 'OnBetterChat' on plugin 'BetterChatFilter v1.6.2' (InvalidOperationException: Sequence contains no elements)
at System.Linq.Enumerable.Last[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0

at Oxide.Plugins.BetterChatFilter.DoWhiteList (System.String word) [0x00000] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.FilterText (Oxide.Core.Libraries.Covalence.IPlayer player, System.String original) [0x00032] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.Filter (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00066] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.OnBetterChat (System.Collections.Generic.Dictionary`2[TKey,TValue] messageData) [0x00000] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.BetterChatFilter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0004e] in <a43b08d7d71f49e699a71b5f97626794>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <9882f28dc2204b4dba514a9ad18f5042>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <9882f28dc2204b4dba514a9ad18f5042>:0

08:13 [Info] [Better Chat] [Global] [Evil] ♂K@MÎK@Dz€♂ 76561############ 08:13:01.5836446: базу добью
08:13 [Info] [Custom Helicopter Tiers] Уровень вертолета Regular вызван для (-393.8, 54.8, -1368.8)
08:13 [Info] Постройка успешно вставлена
08:13 [Info] [Raidable Bases] MediumBase10 @ Z19 : 0 items
08:14 [Info] Постройка успешно вставлена

quick question what version is your BeterChat

v5.2.7

Bc the error i cant produce my self as it comes from no data from betterchat . 
In my server ive never seen that error

Merged post

Give me list of all your plugins . Then ill have a look when i get home . Might have something to do with teamchat

I have about 100 plugins and many are private

gLhKjcF6YJmheax.png NooBlet

Bc the error i cant produce my self as it comes from no data from betterchat . 
In my server ive never seen that error

Merged post

Give me list of all your plugins . Then ill have a look when i get home . Might have something to do with teamchat

The error is stemming from looping your WordWhitelist, but something else (perhaps another plugin) is updating the list during that loop, which is causing the error you see above. You can avoid it by using ToList or similar method with those loops so that the list doesn't change during those loops.