Posted 30 August 2012 - 11:37 PM
I need help making a menu, for some reason i go through to a certain part and then the program just ends…
here is the code if you could help me out that would be cool.
please ignore how stupid the menu looks it doesn't copy correctly when i copy and paste it.
if it really bugs you here is the pastebin link:
http://pastebin.com/bcFs8x6Z
otherwise here is the code
here is the code if you could help me out that would be cool.
please ignore how stupid the menu looks it doesn't copy correctly when i copy and paste it.
if it really bugs you here is the pastebin link:
http://pastebin.com/bcFs8x6Z
otherwise here is the code
start = 1
if start == 1 then
local input1 = 0
local input2 = 0
local input3 = 0
print("Enter bot's coords")
print(" ")
io.write("X: ")
x1 = io.read()
if x1 == 0 then
input1 = 0
else
input1 = x1 + input1
end
print(" ")
io.write("Y: ")
y1 = io.read()
if y1 == 0 then
input2 = 0
else
input2 = y1 + input2
end
print(" ")
io.write("Z: ")
z1 = io.read()
if z1 == 0 then
input3 = 0
else
input3 = z1 + input3
end
term.clear()
term.setCursorPos( 1, 1 )
print("Your Bot's location is:")
io.write(" X: "..input1)
io.write(" Y: "..input2)
io.write(" Z: "..input3)
print(" ")
print("Make sure these are right")
print("if they are not press ctrl+t")
sleep(10)
term.clear()
term.setCursorPos( 1, 1 )
print("Good, Now what do you want to do?")
term.clear()
term.setCursorPos( 1, 1 )
print("")
print("---------------------------------")
print(" Orbital Strike Mode (1) ")
print("---------------------------------")
print(" Mining Mode (2) ")
print("---------------------------------")
print(" Transporting Mode (3) ")
print("---------------------------------")
print("")
print("")
sleep(1)
c1 = io.read
if c1 == 1 then
print("")
print("----------------------------------------------------")
print(" ** * * * * * * * * ___________ * ")
print(" ** * * * * * * * * * |___________| *")
print(" Orbital Strike Mode * * * *| | * ")
print(" * * * * * * * * * | TNT | *")
print(" * *Have Fun! * * * * * |___________|* ")
print(" * * * * * * * *|___________| * ")
print("----------------------------------------------------")
sleep(10)
term.clear()
erm.setCursorPos( 1, 1 )
end