OneOS icon indicating copy to clipboard operation
OneOS copied to clipboard

Installer: 487 Bad argument expected table got number

Open 365Tito opened this issue 6 years ago • 1 comments

Image in attachment ScreenShot 168

365Tito avatar Jul 16 '19 19:07 365Tito

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)

bsergent avatar Feb 25 '20 03:02 bsergent