Advertisement
guitarplayer616

testcode

May 30th, 2015
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1.  
  2. lemons = {}
  3. lemons.__index = lemons
  4.  
  5. function lemons.init(name)
  6.     local name = {}
  7.     setmetatable(name,lemons)
  8.     name.name = varName
  9.     return name
  10. end
  11.  
  12. function lemons:getName()
  13.     return varName
  14. end
  15.    
  16. function lemons:saying()
  17.     print("Hello "..self.getName())
  18. end
  19.  
  20. print("Enter your name here: ")
  21. input = read()
  22. lemonObject = lemons.init(input)
  23. lemonObject:saying()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement