Posted 26 June 2015 - 03:34 PM
Creating a new program for a new power plant using 1 big reactor and 4 turbines
to filter out the reactor and turbines im using
i used a similar code in my liquid display board
to filter out the reactor and turbines im using
for i = #turbines,1,-1 do
if peripheral.getType(turbines[i]) ~= "Turbine" then
print(turbines[i]) //displays peripheral before removing
table.remove(turbines,i)
end
end
i used a similar code in my liquid display board
for i = #drums,1,-1 do
if peripheral.getType(drums[i]) ~= "drum" then
table.remove(drums,i)
end
end
which worked perfectly but for some reason is not working with turbines and ends up removing them from the taable, am i using the wrong "type" ?Edited on 26 June 2015 - 01:37 PM