Jump to content




whats wrong with this code?


  • You cannot reply to this topic
2 replies to this topic

#1 makeme

  • Members
  • 60 posts

Posted 16 February 2013 - 09:16 AM

Ive been trying to create a program to create a wall with set hight and length
Spoiler

all it does is places blocks in a row continually and weirdly the turtle disappears but keeps building forwards

-- thanks in advance

#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 16 February 2013 - 09:44 AM

Split into new topic.

#3 LordIkol

  • Members
  • 197 posts
  • LocationSwitzerland

Posted 16 February 2013 - 08:23 PM

hi makeme,

from first view i would say it is the while true loop you use.

try to change the last part of the Code like this

if table.getn(count) ~= 2 then
  print("Need 2 arguments run with autowall <lenght> <depth>")
   return false
else
  length = tonumber(count[1])
  depth =  tonumber(count[2])
  print("Total Blocks required ")
  print(length * depth)
end
while depth ~= 0 do
  if length ~= 0 then
   digMove()
  else
   down()
end
end

if you have more questions or if this does not work just let me know then i will test the code when im home :)

greetings Loki





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users