This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
DarkEyeDragon's profile picture

Some typing errors on computercraft wiki

Started by DarkEyeDragon, 17 May 2017 - 04:23 PM
DarkEyeDragon #1
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
Lyqyd #2
Posted 17 May 2017 - 06:53 PM
Moved to Wiki Discussion.
Lupus590 #3
Posted 18 May 2017 - 09:48 AM
Was going to fix it, but someone else did without commenting here.