For some reason i get with this code that error below. I tested some stuff but happens all time idk why.
[ChatCommand("home")]
void setHome(BasePlayer player, string command, string[] args)
{
if (args.Length.Equals(1))
{
PrintToChat(player, string.Format(msg("Teleport", command)));
}
else
{
PrintToChat(player, string.Format(msg("InvalidUsage", "Use /sethome 'Home name' !")));
}
}Failed to call hook 'setHome' on plugin 'TeleportPlugin v1.0.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 <e1a80661d61443feb3dbdaac88eeb776>:0
at System.String.FormatHelper (System.IFormatProvider provider, System.String format, System.ParamsArray args) [0x00023] in <e1a80661d61443feb3dbdaac88eeb776>:0
at System.String.Format (System.String format, System.Object[] args) [0x00020] in <e1a80661d61443feb3dbdaac88eeb776>:0