Posted 30 March 2013 - 03:41 AM
Hi, Im trying to get a code to work but i can't figure out what the problem is.
this is the code
everything worked until i added the a = * thing. I added that because after the computer have run the script like 200 times it crashes, so i want it to reboot before that.
Thanks in advance!
P.S collect() is a code from another mod so that is not what is causing the problem
edit. nvm found out that the problem was a = 150 i should be a == 150
this is the code
exp = peripheral.wrap("right")
a = 1
function Ko()
sleep(1)
a = a+1
if a = 150 then os.reboot()
else if redstone.getInput("top") == true
then exp.collect()
turtle.attack()
Ko()
else
turtle.attack()
Ko()
end
end
Ko()
everything worked until i added the a = * thing. I added that because after the computer have run the script like 200 times it crashes, so i want it to reboot before that.
Thanks in advance!
P.S collect() is a code from another mod so that is not what is causing the problem
edit. nvm found out that the problem was a = 150 i should be a == 150