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

'(' expected

Started by Finn, 20 July 2015 - 03:44 PM
Finn #1
Posted 20 July 2015 - 05:44 PM
When i try to start a program, i get an error

'(' expected on line 11
i try to fix it, but nothing worked
How i can fix it?
The code of the program is here http://pastebin.com/Kxsq45qD
Edited on 20 July 2015 - 03:44 PM
KingofGamesYami #2
Posted 20 July 2015 - 05:52 PM
When you define a function, you need parentheses.


local function time()
  cb ("/time set")
end
Finn #3
Posted 20 July 2015 - 06:33 PM
When you define a function, you need parentheses.


local function time()
  cb ("/time set")
end
Thanks, but i get a new error.
When i click right mouse button, i get that

main:20: attempt to call number
Corrected Code http://pastebin.com/YgFwvHhw
Edited on 20 July 2015 - 04:34 PM
MKlegoman357 #4
Posted 20 July 2015 - 06:57 PM
You forgot to add a comma (,) after the 'y' argument.