Advertisement
BlueMond

Testing

Jan 28th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. local storage = peripheral.wrap("right")
  2.  
  3. local all = storage.getAvailableItems()
  4.  
  5. write("Search: ")
  6. local search = read()
  7.  
  8. for num, item in pairs(all) do
  9.     local fing = item.fingerprint
  10.     local count = item.size
  11.     local id = fing.id
  12.    
  13.     if string.find(id, search) then
  14.         print(id..": "..count)
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement