AndreSoYeah

Untitled

Dec 16th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function isSide(side)
  2. tSides = rs.getSide() -- this is a call the the redstone api which returns an array of the sides
  3. end
  4.  
  5. for i = 1, #tSides do
  6. if not needAName( i ) and tSide[i] == side then
  7. return true
  8. end
  9.  
  10. return false
  11. end
  12.  
  13. one = string.lower( read() )
  14.  
  15. if isSide(one) then
  16. print("Correct!)
  17. else
  18. print(one.." is not a side")
  19. end
Advertisement
Add Comment
Please, Sign In to add comment