This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
MmPMSFmM's profile picture

( expected

Started by MmPMSFmM, 23 May 2014 - 03:07 PM
MmPMSFmM #1
Posted 23 May 2014 - 05:07 PM
I'm making a branch mining program, where the length of the branches, the length of the mine, the width of the main tunnel and the amount of floors is customizable. The floors thing is not yet implemented, but the rest should work as planned.

I tried a test run and got a message saying "bios:366: [sting "eBranch"]:69: '(' expected". The problem is, I can't get rid of the message.
http://pastebin.com/NjXDswFM
Lignum #2
Posted 23 May 2014 - 05:12 PM

local function trunk --# You need brackets here.

--# So...
local function trunk()
MmPMSFmM #3
Posted 23 May 2014 - 05:13 PM

local function trunk --# You need brackets here.

--# So...
local function trunk()
… That's not line 69… but it fixed it, thanks!
Lignum #4
Posted 23 May 2014 - 05:24 PM
… That's not line 69… but it fixed it, thanks!

That's because you can write code like this:

local function hello
()

end
Lua didn't find a bracket, so it looked for one on the next line but when it found a 'for', it could conclude that there was no bracket and thusly threw a syntax error on the wrong line.

Anyway, you're welcome!