Posted 01 July 2015 - 11:15 PM
So im trying to make a program that can take user input and give out a string.
of course, when this runs, it just outputs whatever you wrote in. how can i get it so that it will output the string coal or wood if thats what the user typed in?
Thanks!
term.clear()
term.setCursorPos(1,1)
write("What are you looking for\n")
local input = read()
local wood = "1.1"
local coal = "1.2"
while true do
write(input)
sleep(5)
shell.run("disk/database")
end
of course, when this runs, it just outputs whatever you wrote in. how can i get it so that it will output the string coal or wood if thats what the user typed in?
Thanks!
Edited on 02 July 2015 - 12:44 AM