Update rednet_guide.md

This commit is contained in:
JackMacWindows 2023-12-09 13:43:15 -05:00 committed by GitHub
parent 4c4802d238
commit bdb0863bd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -46,12 +46,19 @@ ## Getting started
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.