Posted 13 January 2013 - 10:22 PM
Ok guys. I am just trying to make a program that will build a cobblestone generator for you but i keep getting errors. What I am trying to do is add an interactive menu but when I start the program I get an error relating to an if-statement I am using to allow the user to select options. Here is the snippet of code causing me problems:
NOTE: The function has no end because it keeps going past this statement.
function bMenu()
local m=1
k=os.pullEvent()
term.clear()
term.setCursorPos(1,1)
print("Welcome to Shiny's Cobblestone Generator and Miner!")
print("To begin choose an option:")
print("")
print(" > Build Generator <")
print(" Mine Cobble")
print("------------------------------")
os.pullEvent()
if m=1 and k=28 then | This statement here is causing me
cobbleBuild() |----- problems. It keeps telling me
end | 'then expected' even though the
'then' is obviously there.
Anybody know what is happenng?NOTE: The function has no end because it keeps going past this statement.