Posted 27 December 2012 - 11:57 AM
Hello,
so I'm trying to make a mining program.
My mining program has a bug though and I cannot resolve it, I've rethought it like 20 times and still can't find the error.
http://pastebin.com/64cHCNw1
So what's wrong: my program works but It makes a staircase up instead of mining a straight line. Something is wrong in the function: the second while loop to be exact. It goes up someway though I have no clue why it should be going up.
Program Explanation
It's all about the function Mine()
the function starts off with a while loop for mining forward (to preven issues with gravel)
then we got another while loop to mine up (also to prevent gravel issues)
–> Basically Mine() mines out a 2x3 area. Then we have a for loop at the end to make the tunnel multiple blocks.
The function Light() places torches. It goes back and then forward to prevent the torch being placed on a block that's going to be mined a second later. It uses the 'j' variable to make sure it only places the torches every X blocks.
Thanks in advance
so I'm trying to make a mining program.
My mining program has a bug though and I cannot resolve it, I've rethought it like 20 times and still can't find the error.
http://pastebin.com/64cHCNw1
So what's wrong: my program works but It makes a staircase up instead of mining a straight line. Something is wrong in the function: the second while loop to be exact. It goes up someway though I have no clue why it should be going up.
Program Explanation
It's all about the function Mine()
the function starts off with a while loop for mining forward (to preven issues with gravel)
then we got another while loop to mine up (also to prevent gravel issues)
–> Basically Mine() mines out a 2x3 area. Then we have a for loop at the end to make the tunnel multiple blocks.
The function Light() places torches. It goes back and then forward to prevent the torch being placed on a block that's going to be mined a second later. It uses the 'j' variable to make sure it only places the torches every X blocks.
Thanks in advance