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

Chatbox

Started by DusterTheFirst, 08 May 2015 - 09:34 PM
DusterTheFirst #1
Posted 08 May 2015 - 11:34 PM
i need help with chatboxes

so i have a program and the lines say


local cb = peripheral.wrap('chatbox_3')

function write(text,size,pos1,pos2,wait)
[indent=1]cb.say(text, 100000, true, "store")[/indent]
end

and it returns nothing in the chat

anyone know what to do

also the extra variables are going to be used later
KingofGamesYami #2
Posted 09 May 2015 - 01:20 AM

local cb = peripheral.wrap('chatbox_3')

function write(text,size,pos1,pos2,wait)
  cb.say(text, 100000, true, "store")
end

[code][/code] tags help a lot when posting code.

What you have posted will never do anything, because you never call the function.
Bomb Bloke #3
Posted 09 May 2015 - 08:43 AM
Which chatbox are you using, exactly?
DusterTheFirst #4
Posted 09 May 2015 - 10:07 AM
sorry I forgot to add the last part


write("CODEING",5,1,1,10)

i am useing peripherals++
Edited on 09 May 2015 - 08:34 AM
Square789 #5
Posted 09 May 2015 - 10:16 AM
You also called your function write(), which will lead to an error or something because there is already a function called write().
write() does the same as print(), except it doesn't return "\n" (new line) at the end
Edited on 09 May 2015 - 08:17 AM
Bomb Bloke #6
Posted 09 May 2015 - 10:27 AM
So this thing, then. Your call looks about right.

That said, putting aside what Square mentioned about overriding write (he's right, it's a bad idea), where did you define the CODEING variable? Or did you mean to wrap that in quotes, to treat it as a string?
DusterTheFirst #7
Posted 09 May 2015 - 10:33 AM
oh it is a "" thing sorry
DusterTheFirst #8
Posted 09 May 2015 - 10:55 AM
also how do you enable lables for chatboxes in config
Bomb Bloke #9
Posted 09 May 2015 - 11:40 AM
In your MineCraft folder, there'll be a config folder - odds are there'll be a file named after Peripherals++ in there. Open that in a text editor and see what jumps out at you.
DusterTheFirst #10
Posted 09 May 2015 - 12:44 PM
how do i name it without changeing distances of the chatbox
Bomb Bloke #11
Posted 09 May 2015 - 01:12 PM
Beats me if it's even possible, but you could try passing nil or 0 as the distance.
popdog15 #12
Posted 10 May 2015 - 08:05 AM
There is a limit to the distance within the config last I checked.
DusterTheFirst #13
Posted 10 May 2015 - 10:45 AM
thanks