i've got a query about my code. I currently cant test it so i thought i'd ask. (for context i'm very new to lua) Hopefully i'm not asking a duplicate question, or anything similar.
here's my code currently
write("Column: ")
local column = tonumber( read() )
write("Row: ")
local row = tonumber( read() )
local x = 0
local y = 0
function digforward(str)
repeat
turtle.dig()
turtle.forward()
x = x+1
until x == column
So after the repeat until loop ends, what would i do to set the variable x back to 0? I'm aware that x = 0 would normally do it, but i want to make it so when you run the function it goes till x = column and then set x to 0.
Additionally just so you know this is code for a computer in a game. (from the computercraft mod for minecraft)