I am trying to code a variable Farming Programme for the base, which too begin with started out as a set size, but I wanted to try and make it so I could input two variables, length and width.
All well and good for when it comes to the appearance but not however when it comes to the practical side.
I have the code I have coded, obviously and programmed, and it is confusing me with the error I have.
The code which I am using I cannot get my head around it hopefully one of you can. Especially Bomb Bloke.
Anyways Here the Code
--Automatic Farmer using farming turtle in minecraft --Coded and produced by Paullie --www.Youtube.com/user/AllGamesWide ------------------------------------ --Programme Name: Automatic Farmer --Version: 1.0 --Release Date: 02/03/2015 ------------------------------------ --Comments: Place the turtle on the same level as you want the farm, as the turtle will rise up one block to start the farming process --Place Fuel in slot 16 --Place Seeds in slot 15 --Place WaterBucket in slot 14 local waterBucket = "14" local seeds = "15" local fuell = "16" local fuel = turtle.getFuelLevel() term.clear() --Menu inputting of X,Y Lengths to figure out how big the farm will be term.setCursorPos(3,3) term.setTextColor(colors.blue) textutils.slowPrint("Automatic Farming Programme") term.setCursorPos(5,5) term.setTextColor(colors.white) textutils.slowPrint("Farm Length: ") term.setTextColor(colors.green) term.setCursorPos(20,5) xLength = io.read() term.setCursorPos(5,6) term.setTextColor(colors.white) textutils.slowPrint("Farm Width: ") term.setTextColor(colors.green) term.setCursorPos(20,6) yWidth = io.read() term.setCursorPos(3,8) term.setTextColor(colors.red) tB = xLength * yWidth wB = 8 mB = 1 --Functions function xLen(xLength) for i = 0 do turtle.forward turtle.digDown() turtle.select(seeds) turtle.placeDown() end --End For end--End Function function yWid(yWidth) for i = 0 do xLen(xLength) turtle.turnRight() turtle.forward() turtle.turnRight() turtle.forward(xLength) turtle.turnRight() turtle.turnRight() end --For Function end --End Function --Beginning of the main section of code if fuel < tB then textutils.slowPrint("Cannot Complete Task, Fuel Level too Low") else textutils.slowPrint("Fuel Level Good, Beginning Task!") sleep(1) turtle.up() yWid(yWidth) end
Edited by Paullie, 02 March 2015 - 09:17 PM.