- ComputerCraft | Programmable Computers for Minecraft
- → crazyguymgd's Content
crazyguymgd's Content
There have been 139 items by crazyguymgd (Search limited from 29-March 23)
#74311 Program error.
Posted by crazyguymgd on 14 January 2013 - 12:10 PM in Ask a Pro
#74303 Program error.
Posted by crazyguymgd on 14 January 2013 - 12:00 PM in Ask a Pro
for i = 1, z+2 do turtle.up() end
#74302 Program error.
Posted by crazyguymgd on 14 January 2013 - 11:57 AM in Ask a Pro
turtle.up()
turtle.down()
turtle.turnRight()
turtle.turnLeft()
notice where everything is capitalized. You often try to use turtle.Down() which wont work. Neither with turtle.turnright() and so on.
#74291 Need help with my problem
Posted by crazyguymgd on 14 January 2013 - 11:35 AM in Ask a Pro
#74287 [Lua][Error] startup:27: attempt to call nil
Posted by crazyguymgd on 14 January 2013 - 11:27 AM in Ask a Pro
#74061 Program error.
Posted by crazyguymgd on 14 January 2013 - 12:50 AM in Ask a Pro
#74057 Program error.
Posted by crazyguymgd on 14 January 2013 - 12:45 AM in Ask a Pro
TheOriginalBIT, on 14 January 2013 - 12:41 AM, said:
http://pastebin.com/eCHabxgj
I was just getting into doing this as well...
#74045 Program error.
Posted by crazyguymgd on 14 January 2013 - 12:23 AM in Ask a Pro
#74033 Program error.
Posted by crazyguymgd on 14 January 2013 - 12:01 AM in Ask a Pro
#74023 Program error.
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
but you only need that else if you're actually going to do something else. otherwise just an end.
if that's not clear i'm sure there's a wikipedia page that explains ifs and elses better than I can. or someone else on here.
#74020 [Lua][Error] I need help finding out the error im getting for this a* demo
Posted by crazyguymgd on 13 January 2013 - 11:36 PM in Ask a Pro
basically if it doesn't do what you want it to do, you'll probably have to re-write it to properly fit the structure you want...
#74018 Program error.
Posted by crazyguymgd on 13 January 2013 - 11:29 PM in Ask a Pro
if condition then ... end else ... end
that first end isn't necessary. so you can find those and get rid of them too.
#74011 Program error.
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
and so on
#74010 RC4 Encryption API
Posted by crazyguymgd on 13 January 2013 - 11:09 PM in APIs and Utilities
#74009 [Lua][Error] I need help finding out the error im getting for this a* demo
Posted by crazyguymgd on 13 January 2013 - 11:07 PM in Ask a Pro
[code]
81: for x = 1,h do -- for each cell do
82: cell[x] = {}
83: stringl = filel.readLine()
84: for y = 1,w do
85: cell[x][y] = {}
86: --calculate heuristic
87: dx = math.abs(ex - x)
88: dy = math.abs(ey - y)
89: h = dx + dy
90: cell[x][y].h = h-1
91: ce = stringl:sub(y,y)
92: cell[x][y].type = gettype(ce)
93: end
94: end
[/code]
edit - can't figure out formating with this copied and pasted. sorry all you formatting gods
#74004 Program error.
Posted by crazyguymgd on 13 January 2013 - 10:59 PM in Ask a Pro
Also, turtle.turnRight() not turtle.turn("right")
In your home() function you use os.shutdown instead of os.shutdown()...
and maybe some other things. try going through your code and seeing if you can find any more problems debugging code is like a game, the more problems you find, the more points you get. so far, I'm winning.
#73999 [Lua][Error] I need help finding out the error im getting for this a* demo
Posted by crazyguymgd on 13 January 2013 - 10:49 PM in Ask a Pro
#73991 [LUA][ERROR]Getting false " 'then' expected " error?
Posted by crazyguymgd on 13 January 2013 - 10:27 PM in Ask a Pro
#73971 best way to deal with gravel!
Posted by crazyguymgd on 13 January 2013 - 09:42 PM in Ask a Pro
#73961 looking for a clock(for in game time) that can activate redstone at night and...
Posted by crazyguymgd on 13 January 2013 - 09:33 PM in Ask a Pro
#73960 [Lua][Error] I need help finding out the error im getting for this a* demo
Posted by crazyguymgd on 13 January 2013 - 09:32 PM in Ask a Pro
#73952 looking for a clock(for in game time) that can activate redstone at night and...
Posted by crazyguymgd on 13 January 2013 - 09:21 PM in Ask a Pro
#73950 looking for a clock(for in game time) that can activate redstone at night and...
Posted by crazyguymgd on 13 January 2013 - 09:19 PM in Ask a Pro
time = os.time() if time < 6 or time > 18 then -- redstone output that says it's night endwould tell you if it's night. then you just run that when you want to know if it's night...
#73947 [Lua][Error] startup:27: attempt to call nil
Posted by crazyguymgd on 13 January 2013 - 09:14 PM in Ask a Pro
And I just spent a little while trying to force the error with no luck so something else you are doing must be wrong.
Sorry I couldn't find the problem, just letting you know I tried.
#73937 [Lua][Error] I need help finding out the error im getting for this a* demo
Posted by crazyguymgd on 13 January 2013 - 08:53 PM in Ask a Pro
columna1, on 13 January 2013 - 08:21 PM, said:
81: for y = 1,w do -- for each cell do 82: cell[y] = {} 83: stringl = filel.readLine() 84: for x = 1,h do 85: cell[x][y] = {} 86: --calculate heuristic 87: dx = math.abs(ex - x) 88: dy = math.abs(ey - y) 89: h = dx + dy 90: cell[x][y].h = h-1 91: ce = stringl:sub(y,y) 92: cell[x][y].type = gettype(ce) 93: end 94: end
would define cell[x] first then it would define
cell[x][y] as a table
so that i could use it almost as an object with a 2d identifier
Also if you want i could post the code without the lines numbered
and i have defined cell to as a table
cell[y] = {}, when y is 1, puts an empty table at cell[1].
then you go into the x loop.
when x = 1, cell[1][1] = {} works fine because you created that empty table at cell[1].
But the next time through the for loop, you try to access cell[2][1] which doesn't exist...
- ComputerCraft | Programmable Computers for Minecraft
- → crazyguymgd's Content