I normally understand indexing a nil errors, like with values and other stuff, but this one doesn’t make quite sense.
07:26:26.105 user_lua.console.rbxmx.lua.console.PluginManager.Commands.Glass.glass.install:68: attempt to index nil with 'SetSetting' - Studio - install:68
07:26:26.105 Stack Begin - Studio
07:26:26.105 Script 'user_lua.console.rbxmx.lua.console.PluginManager.Commands.Glass.glass.install', Line 68 - Studio - install:68
07:26:26.106 Script 'user_lua.console.rbxmx.lua.console.PluginManager.Commands.Glass.glass', Line 40 - Studio - glass:40
07:26:26.106 Script 'user_lua.console.rbxmx.lua.console.PluginManager', Line 116 - Studio - PluginManager:116
Is my error, but the weird thing is the exact line where it happens, it seems that plugin is somehow nil?
-- Setting the save table
local jsonSave = http:JSONEncode(save)
plugin:SetSetting("Installed", jsonSave) -- Error line
The script is in a module script, so is it a thing that you can’t call :SetSetting() from a module script/not main script?
This installer script has been giving me a lot of trouble, as you may have seen by my other recent posts, but any help would be greatly appreciated!
Why would you need to use plugin in a module? plugin is specifically for functions plugins have that modules don’t. Anything you would be able to use in a module already exists hence why plugin exists.
Uhhh, for a command handler? I am currently making a package manager and not breaking up the main script would make it almost impossible to traverse and read. Also, it’s very easy to to make new commands very quickly.
Special case, but it would have to have a completely different keyword with some things removed and some added. I don’t think it is worth the effort for a few functions.
Few? The plan is to have a large amount, modern consoles have large amounts of commands, obviously, I won’t have as much but it’s better to have the option of expandability in my case.