SquidDev-CC / CCTweaks

Random additions to ComputerCraft (somewhat deprecated, use CC-Tweaked if you're on Minecraft 1.12).
MIT License
12 stars 2 forks source link

ComputerCraft Original Modem API non-existent? #71

Closed relative2 closed 8 years ago

relative2 commented 8 years ago

When using the latest release of CCTweaks(0.2.3.2), if you attempt to use the gps locate program, you will be met with an error saying gps:87: attempt to call nil. gps is the api of gps and on that line is an if statement.

-- Open a channel
local modem = peripheral.wrap( sModemSide )
local bCloseChannel = false
if not modem.isOpen( os.getComputerID() ) then
    modem.open( os.getComputerID() )
    bCloseChannel = true
end

To reproduce this either do
gps locate with a wireless modem(from ComputerCraft) on the computer.
or do

print(textutils.serialize(peripheral.getMethods("top")))

where you replace top with the side of the wireless modem. That will show the methods that are in the CCTweaks modem API. It doesn't have close, closeAll, isOpen, and any other things. The only methods in the CCTweaks modem API are transmit and open.

SquidDev commented 8 years ago

Hmmm, this shouldn't be the case. I'll have a look, but do you think you could provide me with a mod list/logs?

Update: Don't worry about logs/mod list: I've just tested: this appears to be the case for several peripherals.

relative2 commented 8 years ago

Okay, my mods list is at a pastebin because its a long list. This happened the first update when I added my mods to my modpack. I removed CCTweaks from the pack for version 1.3. http://pastebin.com/fiLMXRrg Also, sorry about the links. It's straight from my modpack permissions page :P Also, after removing CCTweaks from the pack GPS and the modem API is completely fine. Thank you for responding very fast!

SquidDev commented 8 years ago

This might take a while to fix, anything before 0.2.3 should work fine though. Sorry about this :frowning:.

relative2 commented 8 years ago

It's okay, I know you didn't do this intentionally. CCTweaks is completely perfect except for the peripheral API bug. Hope you can find a fix! :smile:

SquidDev commented 8 years ago

Ok, that was stupid of me: I'll try to get a release out soon.