Posted 20 March 2013 - 12:52 AM
Greetings, This is my first time programming in lua, so I'm not familiar with how it works. I tried to make a turtle program to check when my processing facility is getting overloaded with stuff from a buildcraft quarry using ChickenBone's Wireless Redstone mod to cut the power. However, when i try to run it, i keep getting an error telling me that an "=" is expected at line 7. Here is the code i have used:
I have tried several different configurations at each of the If-Then-Else junctions, and have not been successful in getting it to run past line 7
I have tried several different configurations at each of the If-Then-Else junctions, and have not been successful in getting it to run past line 7
while true do
WR = peripheral.wrap("right")
WR.setfreq(947)
T = turtle.suckup(59)
turtle.dropup()
q = WR.get()
If T == true Then
WR.set(true)
print("Quarry overflow prevention Enabled")
sleep(15)
Elseif q == True Then
WR.set(False)
print("Quarry overflow prevention Disabled")
Else
print("Quarry operating maintained")
end
end
end