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

[Peripherals] New CC version and ICBM

Started by Wing, 26 October 2014 - 07:43 PM
Wing #1
Posted 26 October 2014 - 08:43 PM
Quick question for the folks that might know.

Has the ICBM compatibility with CC since stopped working? Come to try again today to find out this no longer worked:

radar = peripheral.wrap("which ever direction")
radar.getEntities()
If you try this, it'll give you: FILENAME:WHICHEVERLINE: attempt to index ? (a nil value)
This kinda blows. Any suggestions?
johnnic #2
Posted 26 October 2014 - 09:29 PM
This code will tell you if there is a peripheral on the specified side and the methods it has.


local side="left" --change this to the side.
if peripheral.isPresent(side) then
print("There is a "..peripheral.getType(side).." peripheral on the "..side.." side.")
print("Its methods are:")
for t,y in pairs(peripheral.getMethods(side)) do
  print(t);
end
else
print("There is no peripheral on the "..side.." side.")
end
Bomb Bloke #3
Posted 26 October 2014 - 09:47 PM
Wing's code has already established that there's no valid peripheral on the specified side. Things aren't going to work with his current mod set up.

As to why: ComputerCraft doesn't accept ICBM blocks as peripherals unless some other mod rigs things otherwise. That other mod may be ICBM. That other mod may be OpenPeripheral. It'd be a matter of finding out which, then checking the version numbers of the two or three mods in concern.