- ComputerCraft | Programmable Computers for Minecraft
- → crazyguymgd's Content
crazyguymgd's Content
There have been 139 items by crazyguymgd (Search limited from 30-March 23)
#74682 [Lua][Error] startup:27: attempt to call nil
Posted by crazyguymgd on 15 January 2013 - 07:43 AM in Ask a Pro
#74587 [lua] script problem
Posted by crazyguymgd on 15 January 2013 - 05:06 AM in Ask a Pro
#74535 Program error.
Posted by crazyguymgd on 15 January 2013 - 01:55 AM in Ask a Pro
#74477 [1.48] YellowSquare Game
Posted by crazyguymgd on 14 January 2013 - 06:50 PM in Programs
Add mouse click to the any key to start, since the mouse is what you use to play the game.
Reset the background color to black before you clear the screen. I don't like it leaving my screen yellow
Also, when I got up to 39 points, it must have put a new square over an old one, so there was really no way of knowing where to click. Now I don't even want to try to beat my high score because odds are, it'll just screw me again
#74476 disk instaler
Posted by crazyguymgd on 14 January 2013 - 06:47 PM in Programs
Rick3333, you have a long way to go but nice job on picking a project and finishing it. Now take these guys (the ones that weren't assholes) advice, modify your project and keep making it better. If you have any other questions just ask!
#74435 Program error.
Posted by crazyguymgd on 14 January 2013 - 04:09 PM in Ask a Pro
#74434 Program error.
Posted by crazyguymgd on 14 January 2013 - 04:08 PM in Ask a Pro
#74432 Turtle Invintory Management and Lava Problem
Posted by crazyguymgd on 14 January 2013 - 04:07 PM in Ask a Pro
#74427 Turtle Invintory Management and Lava Problem
Posted by crazyguymgd on 14 January 2013 - 04:00 PM in Ask a Pro
#74423 Program error.
Posted by crazyguymgd on 14 January 2013 - 03:56 PM in Ask a Pro
function walls() for j = 1,4 do print("value function") if value() then turtle.dig() rn (base, "ore collected at "..z.." ") else turtle.turnRight() end end endLets say there is an ore when j = 1, the value function will return true, you'll dig the ore, sit still, then j increments to 2. Then value will return false, you'll turn right, and j increments to 3. say there is another ore here (we're only on the second wall at this point). value will return true, you'll dig, and then j will increment to 4. Value returns false, you turn right, but now the for loop is done, walls() returns and you never actually check the back or left wall.
Thats a scenario I imagined that could cause this problem. There are probably plenty more.
To solve this, turn right when value() returns true and when it returns false. So you will at least always check every wall.
#74411 Program error.
Posted by crazyguymgd on 14 January 2013 - 03:35 PM in Ask a Pro
#74404 Program error.
Posted by crazyguymgd on 14 January 2013 - 03:18 PM in Ask a Pro
#74398 Program error.
Posted by crazyguymgd on 14 January 2013 - 03:11 PM in Ask a Pro
TheOriginalBIT, on 14 January 2013 - 03:07 PM, said:
function value() if not turtle.detect() then return false end for i = 1 , 3 do print("comparing "..i.." now") turtle.select(i) if turtle.compare() then -- I'm assuming this was meant to be when it finds something return true end end end return false endIts not any different logically, but it has a slightly better flow, then also if you decide to add anything else in later you wont forget to put return false in at the end of the function...
also just a question, shouldn't
How is it not different logically? Originally, if the compare with the block at slot 1 was false, he would return false and never check slot 2 or 3. This checks slots 2 and 3 if 1 fails. Which is differentt
#74395 FTP Client
Posted by crazyguymgd on 14 January 2013 - 03:07 PM in Ask a Pro
#74392 Program error.
Posted by crazyguymgd on 14 January 2013 - 03:01 PM in Ask a Pro
function value() if not turtle.detect() then return false else for i = 1 , 3 do print("comparing "..i.." now") turtle.select(i) if not turtle.compare() then return true end end return false end end
As you can see, it will return true if it finds something at i, and returns false only if the for loop exits, and it hasn't returned true yet.
However, this might cause a problem if there is something at 1 and 2 because it'll return true at 1, then skip 2 because it returned.
#74391 Turtle Invintory Management and Lava Problem
Posted by crazyguymgd on 14 January 2013 - 02:57 PM in Ask a Pro
To go back to the home position, you'll have to keep track of it's position every time it moves in variables like currentX and currentZ and currentY. Then when you need to reload, you go from the currentX to the chestX, then the currentZ to the chestZ, then y... and then back to where you were by doing the reverse.
With the lava problem, I'm not sure why this would be happening to you. I've never had a problem with my turtles in lava. My guess is there is some other factor causing it to stop. Possibly because you only move and dig forward if you detect something.
#74386 Turtle Programs
Posted by crazyguymgd on 14 January 2013 - 02:45 PM in Ask a Pro
#74383 Turtle Programs
Posted by crazyguymgd on 14 January 2013 - 02:39 PM in Ask a Pro
#74371 Program error.
Posted by crazyguymgd on 14 January 2013 - 02:13 PM in Ask a Pro
dam facebook
#74365 Program error.
Posted by crazyguymgd on 14 January 2013 - 02:01 PM in Ask a Pro
#74364 Help with mini-game
Posted by crazyguymgd on 14 January 2013 - 02:00 PM in Ask a Pro
EpicTreeMiner, on 14 January 2013 - 01:36 PM, said:
crazyguymgd, on 14 January 2013 - 01:28 PM, said:
#74361 Program error.
Posted by crazyguymgd on 14 January 2013 - 01:54 PM in Ask a Pro
for i = 1, 3 do if turtle.compare.......... end
#74348 Help with mini-game
Posted by crazyguymgd on 14 January 2013 - 01:28 PM in Ask a Pro
#74344 Program error.
Posted by crazyguymgd on 14 January 2013 - 01:24 PM in Ask a Pro
function value() if turtle.detect() == false then return false end else for i = 1 , 3 if turtle.compareTo(i) == true then return false end else return true end endAnd here's the correct way to use the if's, else's and ends
function value() if turtle.detect() == false then return false else for i = 1 , 3 if turtle.compareTo(i) == true then return false else return true end end end end
#74319 Program error.
Posted by crazyguymgd on 14 January 2013 - 12:28 PM in Ask a Pro
z = 0 while true do print("2") f = turtle.getFuelLevel() if f < z + 10 then rn (base , "Danger! fuel levels low.") turtle.select(16) turtle.refuel() z = turtle.getFuelLevel() if f < z + 10 then rn (base , "Insuficient Coal, Returning.") home() end elseif turtle.detectDown() then turtle.digDown() --turtle.detectDown() print("3") if turtle.detectDown() then rn (base , "I hit bedrock, Returning") print("Your home function") --home() break -- to break out of the while loop end else turtle.down() print("your walls function") --walls() z = z + 1 end end
- ComputerCraft | Programmable Computers for Minecraft
- → crazyguymgd's Content