Advertisement
Eco

Lua Noob If Else

Eco
Jul 10th, 2012
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.29 KB | None | 0 0
  1. -- Finally got this thing working took awhile ...
  2.  
  3. function r()
  4. -- tonumber IMPORTANT won't be a number without it TT
  5.     r = tonumber(io.read())
  6.     print(r)
  7.    
  8.     if r > 5 then
  9.         y=7
  10.     else
  11.         y=3
  12.     end
  13. end
  14.  
  15. r()
  16.  
  17. if (y > 1) and (y < 5) then
  18.    print(y)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement