Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arg.cmd.FullName prints Error #61

Closed
ThePitereq opened this issue Jul 6, 2023 · 1 comment
Closed

arg.cmd.FullName prints Error #61

ThePitereq opened this issue Jul 6, 2023 · 1 comment
Assignees

Comments

@ThePitereq
Copy link
Contributor

When using regular console command in UI trying to get arg.cmd.FullName prints error:

[ShoppyStock] Error (Object reference not set to an instance of an object)
  at Oxide.Plugins.ShoppyStock.ShoppyStockConsoleCommand (ConsoleSystem+Arg arg) [0x0003a] in <2f2723b07ada4e758352f8cca66ed8b1>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <fb001e01371b4adca20013e0ac763896>:0 

Example code:

        [ConsoleCommand("ConsoleCommandTest")]
        private void ConsoleTestCommand(ConsoleSystem.Arg arg)
        {
            Puts($"TEST: {arg.cmd.FullName}");
	}
@raulssorban
Copy link
Member

It's because that command is not a built in registered command, and a Carbon plugin console command

@raulssorban raulssorban self-assigned this Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants