Posted 24 April 2012 - 03:20 AM
How could I get this bit of code to work, I have been fighting it for the past 2 hours. Am I doing the "and" and "or" wrong?
function placetorch() -- Place a torch
if (torches == true) and ((spacingVar or placedValue) == 0) then
halfdistance = halfdistance - 1
if (halfdistance or placedValue) == 0 then
turtle.placeDown()
if turtle.getItemCount(1) == 0 then
noTorches = true
end
spacingVar = torchspacing + 1
halfdistance = halfwidth
-- Update Torches Placed
placedValue = placedValue + 1
arcwrite(placedValue, 33, 5)
end
end
end