Posted 19 August 2014 - 05:17 PM
For some reason, the ethereal jars from Advanced thaumaturgy were recognized as tt_aspectContainer but after the restart they changed to tileetherealjar, I am trying to make this code account for two different types of jars. I tried doing
if peripheral.getType(j) == "tt_aspectContainer" or "tileetherealjar" then, but this does not work, would I need to create a second for loop with different variables than i and j to get the other jars?
Link to full code: http://pastebin.com/tvBYFsrH
Here is the function I am trying to edit
if peripheral.getType(j) == "tt_aspectContainer" or "tileetherealjar" then, but this does not work, would I need to create a second for loop with different variables than i and j to get the other jars?
Link to full code: http://pastebin.com/tvBYFsrH
Here is the function I am trying to edit
function scanEssentia()
for i,j in ipairs(jars) do
if peripheral.getType(j) == "tt_aspectContainer" then
asp = peripheral.call(j, "getAspects")
countasp = peripheral.call(j, "getAspectCount", asp)
if countasp > 0 then
essentia[asp] = math.floor(countasp)
end
-- print(countasp)
-- print(asp..":"..countasp)
-- print(peripheral.getType(j))
end
end
end