9 posts
Posted 07 January 2013 - 12:40 AM
ComputerCraft Version: 1.4.6 (on a FTB Server / Direwolf20 pack)
I wrote a program that essentially draws pixel art using turtles. It does this column by column, starting from the bottom, moving upward, and calling turtle.place() to place the appropriate block.
Occasionally the block will be placed below the turtle instead of in front of it. It seems to happen randomly, and adding a 1 second delay between when it does the move and when it places the block didn't seem to help.
I have not been able to find a circumstance that causes it. It seems to happen about every 100 block places or so.
Searched forum and didn't find anything similar sounding.
Any info appreciated, thanks :)/>
Solved, extreme user stupidity :(/>
Edited on 07 January 2013 - 02:57 PM
2217 posts
Location
3232235883
Posted 07 January 2013 - 06:03 AM
thats weird .-.
try making the turtle use placedown instead
9 posts
Posted 07 January 2013 - 08:44 AM
thats weird .-.
try making the turtle use placedown instead
Unfortunately that would be impractical with my design, or at least require a major rewrite. The image is actually printed by multiple turtles, each responsible for a single material. If they placed blocks down, it would mean the turtles would have to travel in the drawing space, which would of course be filled with blocks placed by the turtles in front of them.
I'll play with it a bit more later, try to isolate it a bit. I tested same program in single player and it seems to work perfectly fine, so maybe has something to do with SMP/lag or something. I was skeptical because this seems like the kind of thing other users woulda noticed.. but it's very hard to picture this being a programming thing (the bot only ever calls turtle.place(), and it's very clear from where the block is missing and actually placed that it's as if the turtle did a place down.. )
2447 posts
Posted 07 January 2013 - 09:52 AM
Yeah, I can't see a reason how this would happen. What surface are they trying to place on?
818 posts
Posted 07 January 2013 - 10:05 AM
Can you like add some screenshots and code you tried?
9 posts
Posted 07 January 2013 - 10:10 AM
Yeah, I can't see a reason how this would happen. What surface are they trying to place on?
Wool usually, though I've seen it happen when placing in "empty space" and stone.
Here is a picture of it occuring on stone:
http://img37.imagesh...30104211236.png (bottom-middle ish where the stone juts out).
Edited on 07 January 2013 - 09:17 AM
9 posts
Posted 07 January 2013 - 10:16 AM
Can you like add some screenshots and code you tried?
http://img37.imagesh...30104211236.png (bottom-middle ish where the stone juts out).
I'll try to make some simplified code that reproduces the problem later. The code I'm using is still pretty rough (it kinda sprawled from another project, I plan on re-writing in a less-hackish way once I get it working smoothly). If your curious anyway:
http://pastebin.ca/2299866
Edited on 07 January 2013 - 09:17 AM
8543 posts
Posted 07 January 2013 - 11:28 AM
Why is line 282 a placeDown?
997 posts
Location
Wellington, New Zealand
Posted 07 January 2013 - 01:29 PM
Why is line 282 a placeDown?
Yup. Your code calls placeDown instead of place when it switches inventory slots.
9 posts
Posted 07 January 2013 - 03:16 PM
.. well.. damn!
Thanks guys, and sorry for wasting time :S
Not sure how the hell this worked in single player though.. must have been an older version of the code or something (I move the code around quite a bit and it's actually generated via another script).. either way that's just painfully embarrassing (if it's any conciliation, I did spend a fair bit of time trying to duplicate the "problem" with of course absolutely no success) :S