Print value from a lua table if pattern matches
问题 Okay, so I just recently got into lua and find myself stuck with the following: I have the function peripheral.getNames() (which is a custom function) it will return a table with the structure key,value, whereas key is always a number and starts from 1 and value will be what the function finds (it searches for devices connected to it) In my example it creates a table which looks like this 1 herp 2 derp 3 monitor_1 4 morederp I can print the values with the following local pgn = peripherals