|
You need quotes around “solar”
and “lunar” in the if statements (without them you are comparing
solu to two variables called solar and lunar. They have no value (aka they are
equal to nil) (If you haven’t found them already,
then the online “Programming in Lua” guide is a useful resource: http://www.lua.org/pil/index.html) This code seems to work print("Enter solar or lunar"); solu = io.read() if solu == "solar" then print("The next solar eclipse will be
displayed here"); end if solu == "lunar" then print("the next lunar eclipse will
show up here"); end From:
lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On
Behalf Of Trey Montgomery Im am creating a eclipse
predictor as a beginner project to get me going with Lua and I am having an
issue. I have written the begining of it, I havent begun with the actual
prediction function yet. I am using lua edit. And i am using the view->debug
window->Lua Output |