oeed / OneOS

OneOS (ComputerCraft Operating System) - The all in one operating system
MIT License
61 stars 20 forks source link

Installer: 487 Bad argument expected table got number #338

Open 365Tito opened 4 years ago

365Tito commented 4 years ago

Image in attachment ScreenShot 168

bsergent commented 4 years ago

I ran into the same problem but was able to fix it by splitting line 487 into two lines with a temporary string variable. Seems that Lua is having trouble parsing that line correctly otherwise. However, I immediately ran into another problem once OneOS actually booted: main.lua:26: attempt to index a nil value, so it's looking to me like there are a few other problems with the current version, possibly related to the newer versions of ComputerCraft. Regardless, here's the fix for the installer:

Line 487:

 f = http.get(('https://raw.github.com/'..Settings.GitHubUsername..'/'..Settings.GitHubRepoName..'/'..latestReleaseTag..Settings.InstallPath..v.path):gsub(' ','%%20'))

can be replaced with:

local temp = ('https://raw.github.com/'..Settings.GitHubUsername..'/'..Settings.GitHubRepoName..'/'..latestReleaseTag..Settings.InstallPath..v.path):gsub(' ','%%20')
f = http.get(temp)