I decided to write two programs. One to broadcast whatever you type and another to receive broadcasts.
The one that broadcasts, works perfectly. But the receiving one doesn't. It gets the broadcasts, but doesn't display the how I want. Instead of saying a whole broadcast, it says "modem_message" and the code is shown below.
component = require("component")
event = require("event")
print("Pulling broadcasts from port 25565")
while true do
os.sleep(.5) --To make sure it doesn't repeat single messages
component.modem.open(25565)
x = event.pull("modem") --Doing it like this =event.pull("modem") brings errors
print(x)
end
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I decided to write two programs. One to broadcast whatever you type and another to receive broadcasts.
The one that broadcasts, works perfectly. But the receiving one doesn't. It gets the broadcasts, but doesn't display the how I want. Instead of saying a whole broadcast, it says "modem_message" and the code is shown below.
Any solution?
Edited by Lizzy TricksterCode tags :)
Link to post
Share on other sites