Why this command not work?
Failed to call hook 'cmdChatHp' on plugin 'plugin v0.1.0' (IndexOutOfRangeException: Index was outside the bounds of the array.)
at Oxide.Plugins.PeacePanel.cmdChatHp (BasePlayer player, System.String command, System.String[] args) [0x0000c] in <92822096f10e442fb81c525aeed0093d>:0
at Oxide.Plugins.PeacePanel.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x004b3] in <92822096f10e442fb81c525aeed0093d>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <8a646463979e4a1d9c0e2f1298e9483f>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <953329caf7d943cc9eca5c8b4b890c98>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <953329caf7d943cc9eca5c8b4b890c98>:0
error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer [ChatCommand("hp")]
void cmdChatHp(BasePlayer player, string command, string[] args)
{
player.Health = 40f;
}if i add this
float health = player.Health;command work, and i have errors indexer