FormatException at OnPlayerSleepEndedSolved
Searching is there, just click it from the navigation drop down menu. This applies to both the forums and plugins.
Wulf: Thank you!
Tricky: Did all that for the 3rd time. Though this time I left it to the defaults, no errors. BUT when I edit the lang JSON, save, do an oxide reload, as soon as it's triggered the error returns.
Coding with Notepad ++
Only line 2 is changed from the orginal.
{ "Welcome": "Welcome to {0}\n--------------------------------------------\n If you are new here use /Rules in chat now!", "Joined": "✔ {0} joined the server from {1}", "JoinedUnknown": "✔ {0} joined the server", "Left": "☒ {0} left the server ({1})"}P.S. error code now reads:

Merged post
Tricky: hook error is caused by the permission welcomer.bypass not being set. Fixed that here.
Nullfrerenceexpetion is still generating due to line 87 not being read (the "Welcome" message). Doesn't matter if this is in the lang json file or hard coded into the .cs file.

In response to GallorumRex ():Wulf: Thank you!Tricky: Did all that for the 3rd time. Though this time I left it to the defaults,...
The error you are seeing is because of the {0} you added in the "Welcome" message; the plugin does not do any replacements in that message and so you will see the FormatException because of that. There isn't anything wrong with the plugin there. C# throws that FormatException because nothing is set to replace {0} with. If default messages do not already have placeholders, I would not add them. If the plugin had placeholders in a previous version, then those would need to be removed from there (changelog mentions deleting this file a few times.)
(02:54:41) | HatzGionule[1044258/76561198088227820] has entered the game
(02:54:44) | Failed to call hook 'OnPlayerSleepEnded' on plugin 'Welcomer v1.5.0' (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 <1f0c1ef1ad524c38bbc5536809c46b48>:0
at System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x00023] in <1f0c1ef1ad524c38bbc5536809c46b48>:0
at System.String.Format (System.String format, System.Object[] args) [0x00020] in <1f0c1ef1ad524c38bbc5536809c46b48>:0
at Oxide.Plugins.Welcomer.Lang (System.String key, System.String id, System.Object[] args) [0x0000e] in <a3c1ecdf4329472c993630225ca3e145>:0
at Oxide.Plugins.Welcomer.OnPlayerSleepEnded (BasePlayer player) [0x00028] in <a3c1ecdf4329472c993630225ca3e145>:0
at Oxide.Plugins.Welcomer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0014e] in <a3c1ecdf4329472c993630225ca3e145>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 Please do a fresh install
ok. Thnks ! IT works perfect.
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 <325b1bc62f5047efb5ddeb01c5aaab10>:0 at Oxide.Plugins.Welcomer.OnPlayerSleepEnded (BasePlayer player) [0x00028] in <325b1bc62f5047efb5ddeb01c5aaab10>:0 at Oxide.Plugins.Welcomer.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0014e] in <325b1bc62f5047efb5ddeb01c5aaab10>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <008b12f41ec4452da1a5497eeb849299>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in :0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0 Your messages are not customized correctly.
ok thx for the tips.. before this update it worked fine, i dunno what i need to change
{
"Welcome": "<size=17>Welcome to <color=#0099CC>{0}\n--------------------------------------------\n<color=#0099CC>• Type <color=#0099CC>/info for all available commands\n<color=#0099CC>• Read the server rules by typing <color=#0099CC>/info\n<color=#0099CC>• Have fun and respect other players",
"Joined": "<color=#b337bc>{0} <color=#37BC61>joined the server from <color=#b337bc>{1}",
"JoinedUnknown": "{0} <color=#37BC61>joined the server",
"Left": "{0} <color=#FF4040>left the server ({1})"
} The {0} hasn't been used in the Welcome message for quite a few updates of this plugin. You'd need to remove that.
I have this same issue, Aoki did you manage to fix yours? I dont know what and where to remove the {0}.
TheDeXI have this same issue, Aoki did you manage to fix yours? I dont know what and where to remove the {0}.
In the above, it's the {0} in the "Welcome" message.
{
"Welcome": "<size=17>Welcome to <color=#0099CC></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",
"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})"
}
Merged post
I removed the {0} in the welcome part, still getting errors, must i remove all of them in that file?
"Welcome": "<size=17>Welcome to <color=#0099CC></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",
"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})"
}
Merged post
I removed the {0} in the welcome part, still getting errors, must i remove all of them in that file?
I'd suggest deleting it and comparing against the default file.
Locked automatically