pathEnv = {
'/rom',
'/rom/programs',
'/rom/programs/http',
'/rom/programs/computer',
'/rom/programs/turtle'
}
local function findFile(path)
if fs.exists(dir..path) then
return true, dir..path
else
for k, v in pairs(pathEnv) do
if fs.exists(v.."/"..path) then
return true, v.."/"..path
end
end
else
for a,p in pairs(shell.aliases()) do --# is this even a real, and/or iterable function? o.O
if a == path then
return true, p
end
end
return false
end
But i get this error:
bios:337: [string 'cash.lua']: 43: 'end' expected (to close function at line 31)
Fix it. get this:
bios:337: [string 'cash.lua']: 50: '<eof>' expected
Unfix, get top error, refix, get bottom error. So on and so on.
How do i fix it?