Posted 13 August 2013 - 05:32 PM
Title: program crashes at if … then… else command
I build a mining machine and used the codes from direwolf20 that he wrote in season 5. But the machine doesn't work verry well for me so i decided to change the codes a little bit to make it work.
The machine is made out of frames and is controlled by one computer. there are 16 turtles that place a miningwell on front of them and put all the items from the miningwell into an enderchest under them.
The problem is some of the turtles can't drop their stuff into the chest and then have to wait with braking the miningwell. But some other turtles can break them and wait for a few secconds and then the machine should move but can't because there are still some miningwells placed. After a few secconds the turtles that could break the miningwells, place them back and so the machine can't move at all.
I had the idea to let all the turtles do their program end after they finished send a signal to the computer. After the computer collected signals from all the 16 turtles it moves the machine wich should be possible because no miningwells are placed. Then after the whole machine moved the computer sends a signal to all the turtles to run the program again.
The problem is I'm not verry good at programming and my program on my computer doesn't work because there should be a mistake in line 9 wich only sais: else
The error is: bios:338: [string "cycle"] :9: syntax error
This is my program:
http://pastebin.com/WB8xMNGw
I really don't know what to do I wached video's on youtube and searched with google to tons off different sites but I couldn't find anything.
sorry for my bad english, I'm from holland
Jelto365
I build a mining machine and used the codes from direwolf20 that he wrote in season 5. But the machine doesn't work verry well for me so i decided to change the codes a little bit to make it work.
The machine is made out of frames and is controlled by one computer. there are 16 turtles that place a miningwell on front of them and put all the items from the miningwell into an enderchest under them.
The problem is some of the turtles can't drop their stuff into the chest and then have to wait with braking the miningwell. But some other turtles can break them and wait for a few secconds and then the machine should move but can't because there are still some miningwells placed. After a few secconds the turtles that could break the miningwells, place them back and so the machine can't move at all.
I had the idea to let all the turtles do their program end after they finished send a signal to the computer. After the computer collected signals from all the 16 turtles it moves the machine wich should be possible because no miningwells are placed. Then after the whole machine moved the computer sends a signal to all the turtles to run the program again.
The problem is I'm not verry good at programming and my program on my computer doesn't work because there should be a mistake in line 9 wich only sais: else
The error is: bios:338: [string "cycle"] :9: syntax error
This is my program:
http://pastebin.com/WB8xMNGw
I really don't know what to do I wached video's on youtube and searched with google to tons off different sites but I couldn't find anything.
sorry for my bad english, I'm from holland
Jelto365