1. So i found bug with function command.AddConsoleCommand.

    Code:
    command.AddConsoleCommand("test", self.Plugin, "CmdTest")
    If i'm trying create command without dot it errors with:

    Code:
    Line: 27 Array index is out of range.:
      at Oxide.Game.Rust.Libraries.Command+ConsoleCommand..ctor (System.String name) [0x00000] in <filename unknown>:0
      at Oxide.Game.Rust.Libraries.Command.AddConsoleCommand (System.String name, Oxide.Core.Plugins.Plugin plugin, System.String callback_name) [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
    If use dot in command (like "test.bla") it works fine. This happens in lua plugin, didn't tested in other languages.
     
  2. Wulf

    Wulf Community Admin

    Rust console commands require two parts. If you want a command to be short, use something such as global.test; otherwise use server.test, my.test, etc.
     
  3. Ah this is rust limitation, ok i just thought its oxide issue. So thank you.
     
  4. Wulf

    Wulf Community Admin

    We could probably toss in a pretty error message, but you'd still need both parts. :)