Posted 05 May 2012 - 02:09 AM
Ok, so i have created a simple program, that is kind of like a conversation.
Its pretty neat, except whenever I try to add things to it, I have problems depending on what I try.
Here is my program:
term.clear()
term.setCursorPos(1,1)
write("Whats your name?")
name=io.read()
print("Hello"..name.."how are you today?")
feeling=io.read()
if feeling=="Good" then
write("So am I!")
end
That is the part that works.Then if I try to add this, then I get "So am I!" again.
if feeling=="Bad" then
write("Oh Im sorry")
end
I am sure you probably know, but I am trying to add another thing, like if I type in "bad" after how are you today, then i get "Oh, Im sorry".
also, how do I put my code in the little white boxes to post them?
Thanks guys
Its pretty neat, except whenever I try to add things to it, I have problems depending on what I try.
Here is my program:
term.clear()
term.setCursorPos(1,1)
write("Whats your name?")
name=io.read()
print("Hello"..name.."how are you today?")
feeling=io.read()
if feeling=="Good" then
write("So am I!")
end
That is the part that works.Then if I try to add this, then I get "So am I!" again.
if feeling=="Bad" then
write("Oh Im sorry")
end
I am sure you probably know, but I am trying to add another thing, like if I type in "bad" after how are you today, then i get "Oh, Im sorry".
also, how do I put my code in the little white boxes to post them?
Thanks guys