40 posts
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
3057 posts
Location
United States of America
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
[co
de][/co
de] tags help a lot when posting code.
What you have posted will never do anything, because you never call the function.
7083 posts
Location
Tasmania (AU)
Posted 09 May 2015 - 08:43 AM
Which chatbox are you using, exactly?
40 posts
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
57 posts
Location
Universe:C:/MilkyWay/Sol/Earth/Europe/Germany
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
7083 posts
Location
Tasmania (AU)
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?
40 posts
Posted 09 May 2015 - 10:33 AM
oh it is a "" thing sorry
40 posts
Posted 09 May 2015 - 10:55 AM
also how do you enable lables for chatboxes in config
7083 posts
Location
Tasmania (AU)
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.
40 posts
Posted 09 May 2015 - 12:44 PM
how do i name it without changeing distances of the chatbox
7083 posts
Location
Tasmania (AU)
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.
82 posts
Posted 10 May 2015 - 08:05 AM
There is a limit to the distance within the config last I checked.
40 posts
Posted 10 May 2015 - 10:45 AM
thanks