Posted 08 June 2014 - 08:59 PM
I'm familiar with other codes, (VisualBasics whatever, and Java) LUA seems pretty basic and I've got a borderline understanding of what I'm typing.
Anyways, after spending a good couple of hours watching videos and looking at websites and forum fixes, none that work, upon running my program it gives me this error:
I'm guessing there is something wrong with the 4th line in the code, but the wiki page for conditions says I'm doing my coding correctly(?)
http://computercraft...onal_statements
I know that 'for's require 2 equals signs to function, so having >= should work.
Anyways, after spending a good couple of hours watching videos and looking at websites and forum fixes, none that work, upon running my program it gives me this error:
bios:339: [string "Nexus"]:4: '=' expected
I'm guessing there is something wrong with the 4th line in the code, but the wiki page for conditions says I'm doing my coding correctly(?)
http://computercraft...onal_statements
I know that 'for's require 2 equals signs to function, so having >= should work.
local time = os.time()
local formattedTime = textutils.formatTime(time, false)
While do
local i = 0
if time >= 12000 then
print("Placing Moonstone blocks...")
turtle.select(2)
for i = 1, 4, 1 do
turtle.digDown()
turtle.placeDown()
for i = 0, 4, 1 do
turtle.forward()
end
turtle.turnLeft()
else if time >= 1 then
print("Placing Diamond blocks...")
turtle.select(1)
for i == 1, 4, 1 do
turtle.digDown()
turtle.placedown()
for i == 1, 4, 1 do
turtle.forward()
end
turtle.turnLeft
end
end