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

Alkchat Program Glitches, Need Help!

Started by AlktatStudios, 21 November 2013 - 06:59 PM
AlktatStudios #1
Posted 21 November 2013 - 07:59 PM
My Code:

error("Code is Locked.")
Edited on 22 November 2013 - 05:37 PM
MKlegoman357 #2
Posted 22 November 2013 - 04:30 AM
rednet.broadcast("Alk:", input2)

Should be:

rednet.broadcast("Alk:" .. input2)

rednet.receive(0.5)
print(message"/n")

Shoul be:

local senderID, message = rednet.receive(0.5)
print(message .. "/n")

Concatinating strings:

local prefix = "Alktat: "
local message = "Hello"
local textToSend = prefix .. message

print(textToSend)
-->> Alktat: Hello
AlktatStudios #3
Posted 22 November 2013 - 07:49 AM
Thanks, But how do I make it so the Person can type it in the program, while not editing the code?

1) Using your broadcast method, it doesnt work.

I mean your give method.


(Bubba, Leave me alone.)
Edited on 22 November 2013 - 05:38 PM
Lyqyd #4
Posted 22 November 2013 - 10:18 AM
Note to Bubba in regard to the above post: he can't use the edit button if his posts haven't been approved yet. He's definitely not coming off of mod preview until he learns to make one post instead of several though.
MKlegoman357 #5
Posted 22 November 2013 - 10:31 AM
1) Using your broadcast method, it doesnt work.

I mean your give method.

This isn't MY method. It's how the rednet API works. Do you get any error?

You should also remove that 0.5 from rednet.receive() because now it should error or print a bunch of blank lines.
AlktatStudios #6
Posted 22 November 2013 - 06:35 PM
1) Using your broadcast method, it doesnt work.

I mean your give method.

This isn't MY method. It's how the rednet API works. Do you get any error?

You should also remove that 0.5 from rednet.receive() because now it should error or print a bunch of blank lines.
Okay, thanks.
bronzeman #7
Posted 22 November 2013 - 11:58 PM
Shoul be:

local senderID, message = rednet.receive(0.5)
print(message .. "/n")

Concatinating strings:

local prefix = "Alktat: "
local message = "Hello"
local textToSend = prefix .. message

print(textToSend)
–>> Alktat: Hello
How do you make these boxes containing code?