FormatException at OnPlayerSleepEndedSolved
Keeps spamming the following message in console:
Failed to call hook 'OnPlayerSleepEnded' on plugin 'Welcomer v1.5.1' (FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.)
at System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x000ff] in <437ba245d8404784b9fbab9b439ac908>:0
at System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x00023] in <437ba245d8404784b9fbab9b439ac908>:0
at System.String.Format (System.String format, System.Object[] args) [0x00020] in <437ba245d8404784b9fbab9b439ac908>:0
at Oxide.Plugins.Welcomer.Lang (System.String key, System.String id, System.Object[] args) [0x0000e] in <bc138d9de56a43dd8f863102112d7191>:0
at Oxide.Plugins.Welcomer.OnPlayerSleepEnded (BasePlayer player) [0x00028] in <bc138d9de56a43dd8f863102112d7191>:0
at Oxide.Plugins.Welcomer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0014e] in <bc138d9de56a43dd8f863102112d7191>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0 Tried doing a clean install with the most up to date version, and I'm still getting this:
Failed to call hook 'OnPlayerSleepEnded' on plugin 'Welcomer v1.5.1' (FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.)
at System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x000ff] in <437ba245d8404784b9fbab9b439ac908>:0
at System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x00023] in <437ba245d8404784b9fbab9b439ac908>:0
at System.String.Format (System.String format, System.Object[] args) [0x00020] in <437ba245d8404784b9fbab9b439ac908>:0
at Oxide.Plugins.Welcomer.Lang (System.String key, System.String id, System.Object[] args) [0x0000e] in <0887ab9526fd4d9e96fab2c8a540799e>:0
at Oxide.Plugins.Welcomer.OnPlayerSleepEnded (BasePlayer player) [0x00028] in <0887ab9526fd4d9e96fab2c8a540799e>:0
at Oxide.Plugins.Welcomer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0014e] in <0887ab9526fd4d9e96fab2c8a540799e>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0Merged post
Ok so in this:
"Welcome": "<size=17>Welcome to <color=#0099CC>{0}</color></size>\n--------------------------------------------\n<color=#0099CC>•</color> Type <color=#0099CC>/info</color> for all available commands\n<color=#0099CC>•</color> Read the server rules by typing <color=#0099CC>/info</color>\n<color=#0099CC>•</color> Have fun and respect other players",
if I remove the zero in this <color=#0099CC>{0}</color>
It stops dropping errors and actually shows the full message in chat. BUT.
Instead of it saying "(playername) has joined the server from (country)" it says "? has joined the server from (country)"
I tried switching it to a one but it still didnt work.
Merged post
Got it. remove the "{0}</color></size>" from the
"Welcome": "<size=17>Welcome to <color=#0099CC>{0}</color></size>\n--------------------------------------------\n<color=#0099CC>•</color> Type <color=#0099CC>/info</color> for all available commands\n<color=#0099CC>•</color> Read the server rules by typing <color=#0099CC>/info</color>\n<color=#0099CC>•</color> Have fun and respect other players",
So the final thing that works, in welcomer.json in the en folder in lang. this is the WHOLE thing:
{
"Welcome": "<size=17>Welcome to <color=#0099CC>\n--------------------------------------------\n<color=#0099CC>•</color> Type <color=#0099CC>/info</color> for all available commands\n<color=#0099CC>•</color> Read the server rules by typing <color=#0099CC>/info</color>\n<color=#0099CC>•</color> Have fun and respect other players",
"Joined": "<color=#37BC61>✔</color> {0} <color=#37BC61>joined the server</color> from <color=#37BC61>{1}</color>",
"JoinedUnknown": "<color=#37BC61>✔</color> {0} <color=#37BC61>joined the server</color>",
"Left": "<color=#FF4040>✘</color> {0} <color=#FF4040>left the server</color> ({1})"
}
Failed to call hook 'OnPlayerSleepEnded' on plugin 'Welcomer v1.5.1' (FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.)
at System.Text.StringBuilder.AppendFormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x000ff] in <437ba245d8404784b9fbab9b439ac908>:0
at System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x00023] in <437ba245d8404784b9fbab9b439ac908>:0
at System.String.Format (System.String format, System.Object[] args) [0x00020] in <437ba245d8404784b9fbab9b439ac908>:0
at Oxide.Plugins.Welcomer.Lang (System.String key, System.String id, System.Object[] args) [0x0000e] in <ecb47c1983d54044a617a914b0ba8726>:0
at Oxide.Plugins.Welcomer.OnPlayerSleepEnded (BasePlayer player) [0x00028] in <ecb47c1983d54044a617a914b0ba8726>:0
at Oxide.Plugins.Welcomer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0014e] in <ecb47c1983d54044a617a914b0ba8726>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <d09a1f46ca2f4432811bcfe45ad13c7b>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <cf88a28c7fb44d36890d85a78331cc9d>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <cf88a28c7fb44d36890d85a78331cc9d>:0