This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Metalhawk2012's profile picture

What "type" is a Big reactors turbine

Started by Metalhawk2012, 26 June 2015 - 01:34 PM
Metalhawk2012 #1
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

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
Bomb Bloke #2
Posted 26 June 2015 - 03:37 PM
Why not have your loop print the type, so you can see?
Metalhawk2012 #3
Posted 26 June 2015 - 03:42 PM
ah cheers i found its type now lol sorry if it was too simple of a question im not very experienced with CC

BigReactors-Turbine

Thanks for the help =D
Edited on 26 June 2015 - 01:44 PM