ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: mawlwurst on Dec 31, 2020, 07:08 AM

Title: startup.lua:18: unexpected symbol
Post by: mawlwurst on Dec 31, 2020, 07:08 AM
First time on the forum so I probably messed something up, but I ran into an error which I couldn't find an answer for. It is odd because everything I found about it has near 'something' included in the error message. Here's the code
local counter = 0
local novicecounter = 0
local mastercounter = 0
function down()
    local x, t = turtle.inspectDown()
    while t.name ~= 'minecraft:bedrock' do
        turtle.digDown()
        turtle.down()
    end
end
function up()
    while counter < 75 do
        turtle.digUp()
        turtle.up()
        counter = counter + 1
    end
end 
while mastercounter ~= do
    while novicecounter ~= 16 do
        down()
        turtle.digForward()
        turtle.forward()
        up()
        novicecounter = novicecounter + 1
    end
    turtle.turnLeft() 
    turtle.turnLeft()
    mastercounter = mastercounter + 1
end

https://pastebin.com/zriwvdNL if the codeblock didn't work.
Title: startup.lua:18: unexpected symbol
Post by: Lupus590 on Dec 31, 2020, 08:26 AM
On line 18 you have while mastercounter ~= do you are missing something to compare mastercounter to.
Title: startup.lua:18: unexpected symbol
Post by: mawlwurst on Dec 31, 2020, 10:40 AM
Oh I don't know how I didn't see that, thank you