zekesonxx, on 10 January 2013 - 11:31 AM, said:
Ha that was kind of fun too.
There have been 139 items by crazyguymgd (Search limited from 29-March 23)
Posted by crazyguymgd on 10 January 2013 - 11:34 AM in Forum Discussion
zekesonxx, on 10 January 2013 - 11:31 AM, said:
Posted by crazyguymgd on 10 January 2013 - 10:38 AM in Forum Discussion
AfterLifeLochie, on 10 January 2013 - 10:20 AM, said:
tiin57, on 10 January 2013 - 10:14 AM, said:
Cranium, on 10 January 2013 - 10:10 AM, said:
Posted by crazyguymgd on 26 January 2013 - 03:54 PM in Operating Systems
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
Posted by crazyguymgd on 14 January 2013 - 02:13 PM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 02:01 PM in Ask a Pro
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...
Posted by crazyguymgd on 14 January 2013 - 03:35 PM in Ask a Pro
Posted by crazyguymgd on 15 January 2013 - 01:55 AM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 04:09 PM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 04:08 PM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 01:54 PM in Ask a Pro
for i = 1, 3 do if turtle.compare.......... end
Posted by crazyguymgd on 14 January 2013 - 03:18 PM in Ask a Pro
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
Posted by crazyguymgd on 13 January 2013 - 11:42 PM in Ask a Pro
if condition then if condition then -- do something end else -- do something else end
Posted by crazyguymgd on 13 January 2013 - 11:29 PM in Ask a Pro
if condition then ... end else ... end
Posted by crazyguymgd on 13 January 2013 - 11:12 PM in Ask a Pro
function foo() ... end if condition then ... end if condition then if condition2 then ... end else ... end while something do ... end for x = 1, n do ... end
Posted by crazyguymgd on 13 January 2013 - 10:59 PM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 12:01 AM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 12:23 AM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 12:00 PM in Ask a Pro
for i = 1, z+2 do turtle.up() end
Posted by crazyguymgd on 14 January 2013 - 11:57 AM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 12:50 AM in Ask a Pro
Posted by crazyguymgd on 14 January 2013 - 12:45 AM in Ask a Pro
TheOriginalBIT, on 14 January 2013 - 12:41 AM, said:
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