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

Pocket Computer and modem

Started by SirKitty, 29 May 2014 - 10:36 AM
SirKitty #1
Posted 29 May 2014 - 12:36 PM
Hi, so i've been trying to use a Pocket Computer to open a door. I am really new with Modems and have only used ComputerCraft for a while. I made some things that didn't work and I need some help I made Pastebins of the code in my computer and on the Pocket one:
Pocket: http://pastebin.com/3BU7NyN9
Computer: http://pastebin.com/zVu0t057

Please help as fast as you can. Thanks :)/>
CometWolf #2
Posted 29 May 2014 - 04:10 PM
You don't appear to be opening any channels or even receiving any messages on your computer

local modem = peripheral.wrap("top")
if message == "Open" then --message is still a nil variable here, so it will never equal "Open"
SirKitty #3
Posted 29 May 2014 - 06:52 PM
haha didn't even realize. Thanks :D/>/>

How can I make a "if the message is Open then rs.setOutput thing with Peripherals? Is that possible or do I have to use Rednet?

I fixed it! :)/>/> It works now, I switched the message to

id,message = rednet.recieve()
if id==0 then