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

API Error: Bios:339: [string "customturtleapi"]:19: <name> or '...' expected.

Started by kingculta, 12 April 2014 - 04:50 PM
kingculta #1
Posted 12 April 2014 - 06:50 PM
I have been trying to create a program on my 'Direwolf20 v1.0.9 Mod Pack (Using the Feed the Beast launcher)' world using a mining turtle. I made an APi(http://pastebin.com/3UpevYQJ) to store a lot of the functions that I would be needing for the quarrying program. I put the api in the rom/apis folder (mods/Computercraft1.57.zip/assets/lua/rom/apis) in hopes that it would load automatically. However, whenever I load up the game and open the turtle, the error: Bios:339: [string "customturtleapi"]:19: <name> or '…' expected . I've done lots of searching through forums and wikis trying to figure out how to fix it, but nothing has worked so far.
Btw, im using version 1.57 of computercraft.
Bomb Bloke #2
Posted 12 April 2014 - 11:47 PM
The number 19 there is referring to the line in your API with the error:

function locationChange(local way)

In this case, that should be:

function locationChange(way)

"way" will automatically be localised to "locationChange".
kingculta #3
Posted 13 April 2014 - 12:30 AM
Thanks, Bomb Bloke, I'll make sure to look out for this in the future.