So i found bug with function command.AddConsoleCommand.
If i'm trying create command without dot it errors with:Code:command.AddConsoleCommand("test", self.Plugin, "CmdTest")
If use dot in command (like "test.bla") it works fine. This happens in lua plugin, didn't tested in other languages.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
Solved Command.AddConsoleCommand Array index is out of range
Discussion in 'Rust Discussion' started by AlexALX_[rus-ua], Jul 8, 2015.
-
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.
-
Ah this is rust limitation, ok i just thought its oxide issue. So thank you.
-
Wulf Community Admin