Posted 25 June 2013 - 07:59 PM
So I have recently been working on a system with CC and IndustrialCraft (also ender chests) at the moment the system is designed to detect when items are in an ender chest, it then sends a redstone signal down bundled redstone cable (respective to its colour) and from that the computer detects what colour is on (or if multiple are on it detects the first one first then the next, going in order of the colour api e.g 1=white, 2=orange ect…
So far I have the colour white as 5 induction furnaces, and orange as 5 singularity compressor.
Basic functionality/the best way I can think to describe it!
Lets say I have a quarry going, I have all of the cobblestone going into an ender chest it then gets sorted to my induction furnace ender chest, then in a loaded chunk a wooden transport pipe has a GATE on it detecting if a items are in the inventory, if they are it will give a redstone signal which is directly connected to a insulated bit of wire respective to the last colour of the ender chest (for this system I am using orange, orange, *colour can change*) so for the induction furnace its colour is orange, orange then white, if there are items in that ender chest the wooden pipe with the gate will send out a redstone signal, which the white wire will pick up sending it through bundled cable into the left side of a computer.
The computer side of things:
On startup it will run "if redstone.getBundledInput() > 0 then * run through the functions until it gets true from an if statement from a function" then "else rEvent = os.pullEvent("redstone") * then it does as before runs through the functions until it gets true* end"
If it doesnt meet any of these requirements for some reason, meaning if it got a redstone signal but after running through all of the functions it still didnt shell.run any programs it sleeps for a few seconds then does shell.run("startup")
Here is the problem!
It works completely fine! Nothing wrong at all! then after about 1 minute of running it crashes the server (weird thing is it is my server so I have access to the VPN it doesnt actually crash the server terminal it just puts it in a state like a text editor, any minecraft server commands do nothing: example "stop" should stop the server but it doesnt "save-all" should save the world but again nothing, no feedback, no errors nothing!
I am thinking I maybe have a variable that is just going up and up until it reaches the max it can be or something n00bish like that.
Thanks in advanced guys!
P.s I know this system is completely unnecessary and I could just use enderchests above the machines with the wooden pipes with gates sending out a redstone signal when they have something inside then attach engines and it would work, however 1. Where is the fun in that? 2. It works but its too generic. 3. This "factory" is designed for turtle's to be traveling around, since the NPC villagers are so useless the turtles are my "workers"
P.p.s I have attached the startup files for the computer and the turtles if my explanation was not clear enough/ you would probably also need to check out the code to see if I do have some noob error. For the turtle script in the part where it passes the command onto the next turtle it does that until it reaches the end turtle then the end turtle instead of sending it to the next turtle it sends it back to the very first turtle.
So far I have the colour white as 5 induction furnaces, and orange as 5 singularity compressor.
Basic functionality/the best way I can think to describe it!
Lets say I have a quarry going, I have all of the cobblestone going into an ender chest it then gets sorted to my induction furnace ender chest, then in a loaded chunk a wooden transport pipe has a GATE on it detecting if a items are in the inventory, if they are it will give a redstone signal which is directly connected to a insulated bit of wire respective to the last colour of the ender chest (for this system I am using orange, orange, *colour can change*) so for the induction furnace its colour is orange, orange then white, if there are items in that ender chest the wooden pipe with the gate will send out a redstone signal, which the white wire will pick up sending it through bundled cable into the left side of a computer.
The computer side of things:
On startup it will run "if redstone.getBundledInput() > 0 then * run through the functions until it gets true from an if statement from a function" then "else rEvent = os.pullEvent("redstone") * then it does as before runs through the functions until it gets true* end"
If it doesnt meet any of these requirements for some reason, meaning if it got a redstone signal but after running through all of the functions it still didnt shell.run any programs it sleeps for a few seconds then does shell.run("startup")
Here is the problem!
It works completely fine! Nothing wrong at all! then after about 1 minute of running it crashes the server (weird thing is it is my server so I have access to the VPN it doesnt actually crash the server terminal it just puts it in a state like a text editor, any minecraft server commands do nothing: example "stop" should stop the server but it doesnt "save-all" should save the world but again nothing, no feedback, no errors nothing!
I am thinking I maybe have a variable that is just going up and up until it reaches the max it can be or something n00bish like that.
Thanks in advanced guys!
P.s I know this system is completely unnecessary and I could just use enderchests above the machines with the wooden pipes with gates sending out a redstone signal when they have something inside then attach engines and it would work, however 1. Where is the fun in that? 2. It works but its too generic. 3. This "factory" is designed for turtle's to be traveling around, since the NPC villagers are so useless the turtles are my "workers"
P.p.s I have attached the startup files for the computer and the turtles if my explanation was not clear enough/ you would probably also need to check out the code to see if I do have some noob error. For the turtle script in the part where it passes the command onto the next turtle it does that until it reaches the end turtle then the end turtle instead of sending it to the next turtle it sends it back to the very first turtle.