Jump to content




Some typing errors on computercraft wiki

turtle api

2 replies to this topic

#1 DarkEyeDragon

  • Members
  • 31 posts
  • LocationBelgium

Posted 17 May 2017 - 05: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

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,397 posts

Posted 17 May 2017 - 05:53 PM

Moved to Wiki Discussion.

#3 Lupus590

  • Members
  • 1,726 posts
  • LocationUK

Posted 18 May 2017 - 08:48 AM

Was going to fix it, but someone else did without commenting here.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users