Posted 05 March 2014 - 07:01 PM
Will this work to wrap peripherals?
I'm getting "peripheral :20: expected string"
local PeriList = peripheral.getNames()
local TankList = {}
local OtherPeriList = {}
local MonList = {}
local o = 1
local u = 1
local m = 1
for i = 1, #PeriList do
if PeriList == "rcirontankvalvetile" then
TankList = PeriList
u = u + 1
elseif PeriList == "monitor" then
MonList[m] = PeriList
m = m + 1
else
OtherPeriList[o] = PeriList
o = o + 1
end
end
local Tank1 = peripheral.wrap(TankList[1])
local Tank2 = peripheral.wrap(TankList[2])
local Tank3 = peripheral.wrap(TankList[3])
local Tank4 = peripheral.wrap(TankList[4])
local Mon = peripheral.wrap(MonList[1])
I'm getting "peripheral :20: expected string"
local PeriList = peripheral.getNames()
local TankList = {}
local OtherPeriList = {}
local MonList = {}
local o = 1
local u = 1
local m = 1
for i = 1, #PeriList do
if PeriList == "rcirontankvalvetile" then
TankList = PeriList
u = u + 1
elseif PeriList == "monitor" then
MonList[m] = PeriList
m = m + 1
else
OtherPeriList[o] = PeriList
o = o + 1
end
end
local Tank1 = peripheral.wrap(TankList[1])
local Tank2 = peripheral.wrap(TankList[2])
local Tank3 = peripheral.wrap(TankList[3])
local Tank4 = peripheral.wrap(TankList[4])
local Mon = peripheral.wrap(MonList[1])
Edited on 05 March 2014 - 06:05 PM