Posted 17 May 2017 - 06:23 PM
I was reading trough the GPS Self tracker guide and i kept getting the error: "then expected at line 10"
I havent used computercraft/lua in a while so I first didnt notice the flaw in the code. After a while I figured the != isn't used at all in lua.
So plz change this code on the wiki.:
from
function getLocation() – return the location
if xPos != nil then
return xPos, yPos, zPos
elseif xPos == nil then
return nil
end
end
to
function getLocation() – return the location
if xPos ~= nil then
return xPos, yPos, zPos
elseif xPos == nil then
return nil
end
end
I havent used computercraft/lua in a while so I first didnt notice the flaw in the code. After a while I figured the != isn't used at all in lua.
So plz change this code on the wiki.:
from
function getLocation() – return the location
if xPos != nil then
return xPos, yPos, zPos
elseif xPos == nil then
return nil
end
end
to
function getLocation() – return the location
if xPos ~= nil then
return xPos, yPos, zPos
elseif xPos == nil then
return nil
end
end