Advertisement
RiseAboveHate

table test

Nov 18th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1, 1)
  3.  
  4. local Table = {"175", "217", "218", "219", "220"}
  5.  
  6. print("Please enter: '175' | '217' | '218' | '219' | '220'.\n")
  7. write("")
  8. local sCode = read()
  9. print("You entered: "..sCode.."\n")
  10.  
  11. for i=1, #Table do
  12.     print(Table[i].."\n\n")
  13.    
  14.     if sCode ~= Table[i] then
  15.         print("| sCode = "..sCode.." | Is Invalid!")
  16.         return false
  17.     else
  18.         sCode = Table[i]
  19.         print("sCode = "..sCode)
  20.         return true
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement