So I’ve been working on a module install system, but I keep getting this error after running
16:29:29.950 Can't parse JSON - Studio - install:34
16:29:29.950 Stack Begin - Studio
16:29:29.950 Script 'user_lua.console.rbxmx.lua.console.PluginManager.Commands.Glass.glass.install', Line 34 - Studio - install:34
16:29:29.950 Script 'user_lua.console.rbxmx.lua.console.PluginManager.Commands.Glass.glass', Line 40 - Studio - glass:40
16:29:29.950 Script 'user_lua.console.rbxmx.lua.console.PluginManager', Line 116 - Studio - PluginManager:116
16:29:29.951 Stack End - Studio
Here is my code currently
local req = ""
if args == "Test" then req = http:GetAsync("https://api.github.com/repos/acuaro-codes/test") end
local json = http:JSONDecode(req)
for i = 1, #json do
local file = json[i]
if (file.type == "file") then
local name = file.name:sub(1, #file.name-4)
local module = Instance.new("ModuleScript")
module.Name = name
module.Source = http:GetAsync(file.download_url)
module.Parent = script.Parent.Parent.Parent
Currently, I’m not handling missing stuff, but my input is glass install Test, and it just throws this error.
The only other article I could find about this is this one, but I couldn’t get any use out of it.
I’m new to the GitHub API so let so please let me know if I am requesting something wrong or should change a certain thing, thanks in advance!
I would print req to make sure you are actually parsing the data and making sure its actually needed since if the github returns text you wont need to parse it. It could also be your not specifying headers, methods, etc.
Hey! This is for lua.console, a console plugin for ROBLOX studio! I have commands like rm, insert, create, etc, and this is for my package manager. The hope is people will be able to create their own commands, similar to npm
If your interested you can scroll down in the What are you working on 2021? category and I made some progress posts there!