53 posts
Location
Adelaide, Australia.
Posted 22 January 2013 - 06:21 PM
How can I open every modem side using a table?
7508 posts
Location
Australia
Posted 22 January 2013 - 06:23 PM
This uses the function getSides in the redstone (rs) API which returns a table of the sides… it then iterates through and using the peripheral API checks to see if the peripheral is a modem, if it is open the modem…
for _,v in pairs( rs.getSides() ) do
if peripheral.getType( v ) == "modem" then
rednet.open( v )
end
end
53 posts
Location
Adelaide, Australia.
Posted 22 January 2013 - 06:25 PM
Thanks SO much… I was just about to try that!