Command.Slash.Register yields a table into which you can insert things.
Do not assign to table.insert, that way lies madness.
x = Command.Slash.Register("foo")
table.insert(x, { function, addon_name, name })
BTW, my LibGetOpt offers a way to get some of this done automatically for you, and get your function called with the command line arguments, parsed out for your convenience.
|