Posted 26 January 2016 - 05:00 AM
I'm not completely new, but I stepped away from minecraft for a bit and now I came back to it. So I'm trying to semi-automate some gourmaryllis (from the botania mod). I've got the script for the main part of the program down, but for some reason I can't seem to work out this statement. I usually like to run programs and then have it ask me if I want to clear the screen because I usually have some text print so I can see a bit of progression.
So here's what I have for the clear screen bit:
The problem is whenever I type in 1, it still goes and prints, "You don't want to clear that mess? Ok…" I tested it out by replacing e with 1 so it reads, "1 == 1", and it works. So any idea on what I did wrong?
So here's what I have for the clear screen bit:
print("Looks like that's it. Clear?")
print("Hit 1 for yes, 2 for no.")
local e = read()
if e == 1 then
print("Ok then. clearing screen!")
sleep(1)
term.clear()
else
print("You don't want to clear that mess? Ok...")
end
The problem is whenever I type in 1, it still goes and prints, "You don't want to clear that mess? Ok…" I tested it out by replacing e with 1 so it reads, "1 == 1", and it works. So any idea on what I did wrong?