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

cannot write on sign in program?

Started by jaytea, 15 April 2014 - 12:47 PM
jaytea #1
Posted 15 April 2014 - 02:47 PM
Hello everyone

i just got started with my own little computercraft project and got stuck with this problem.
I wrote a function that basically gets an ID over rednet, places a sign and writes the message on it. Code:


function placeSign()
local id = reqNewSignID()
if id == nil then
  return
end

print("got id "..tostring(id))
turtle.place(tostring(id))
end

reqNewSignID gets the message over rednet and returns the id among other things. The output I get from the turtle is as expected but the sign is placed empty.

The strange thing is that when I do this over the interactive lua shell everything works fine

id=1
turtle.place(tostring(id))
Lyqyd #2
Posted 15 April 2014 - 03:29 PM
What, exactly, does the print statement there display just before it places the sign?
Bomb Bloke #3
Posted 15 April 2014 - 03:45 PM
Does reloading the chunk (by eg restarting the game) reveal anything on the empty signs?

What version of ComputerCraft are you using?
dan200 #4
Posted 15 April 2014 - 04:45 PM
Fixed in 1.63pr4. This should of been posted in bug reports, then i'd have seen it and fixed it
jaytea #5
Posted 15 April 2014 - 04:55 PM
oh, ok. I was not sure whether this was a bug or just me overlooking something.

Thanks so much for this fast response!