Skip to content

Commit

Permalink
Update rednet_guide.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Dec 9, 2023
1 parent 4c4802d commit bdb0863
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/guides/rednet_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,19 @@ Before using Rednet, your program needs to open it. Opening Rednet will tell the
modem to start listening for messages from other computers. The
[`rednet.open`](https://tweaked.cc/module/rednet.html#v:open) function takes the
side of the modem to open as a string. On pocket computers, this will always be
`back`. For example, if your modem is on the left side, you would use this code:
`back`. For example, if your modem is on the left side of the computer, you
would use this code:

```lua
rednet.open("left")
```

You can also use this code to open every attached modem at once:

```lua
peripheral.find("modem", rednet.open) -- (Ab)uses peripheral.find's filter parameter to run rednet.open for each modem found.
```

Always run this function before you do anything with Rednet - otherwise, it may
not function as expected.

Expand Down

0 comments on commit bdb0863

Please sign in to comment.