Advertisement
carrots084

Untitled

Jul 21st, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. --os.pullEvent = os.pullEventRaw
  2.  
  3. --Ask for name, set as variable: pName
  4. print("What is your in-game name?")
  5. local pName = read()
  6. print("How many suggestions do you have?")
  7. local sugNum = read()
  8. sugNum = tonumber(sugNum)
  9. suggestions = { }
  10. for i = 1, sugNum do
  11. print("What is your suggestion?")
  12. local suggestion = read()
  13. table.insert(suggestions, suggestion) --You don't need a key.
  14. end
  15. for i=1, #suggestions do --"#" is length of table/string.
  16. local h = fs.open(pName, "w")
  17. h.write(i .. ": " .. suggestions[i])
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement