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

[Lua][Error] lua:27: [string "lua"]:1: '<name>' expected [SOLVED]

Started by SilentPro, 10 August 2012 - 02:14 PM
SilentPro #1
Posted 10 August 2012 - 04:14 PM
What does this error mean??
It occurs after trying to load an self-written API from lua prompt.
Cloudy #2
Posted 10 August 2012 - 04:51 PM
Without seeing the code you enter we can't tell you that.
SilentPro #3
Posted 10 August 2012 - 06:42 PM
I said that it's the result of "os.loadAPI("…")".
The API is my own and almost 1000 lines of code, which I don't want to post yet.

I just like to know, if this refers to a concrete syntax error.
Don't know, why the error occurs in/refers to "lua" (what's that?) and not in/to my API code.
SilentPro #4
Posted 10 August 2012 - 06:49 PM
PROBLEM SOLVED!

It's shameful, but I just entered "os.loadAPI.("…")".
This doesn't produce the often seen "attempt to call nil" when mistyping a function name.
And of course, "lua" refers to the lua interpreter that fails to interpret the user input correctly.

Maybe this helps others to find this error more quickly, as it's easy to miss/over-look.
Cloudy #5
Posted 10 August 2012 - 06:56 PM
PROBLEM SOLVED!

It's shameful, but I just entered "os.loadAPI.("…")".
This doesn't produce the often seen "attempt to call nil" when mistyping a function name.
And of course, "lua" refers to the lua interpreter that fails to interpret the user input correctly.

Maybe this helps others to find this error more quickly, as it's easy to miss/over-look.

The Lua interpreter isn't failing to interpret the user input - the user input will be wrong ;)/>/>
SilentPro #6
Posted 10 August 2012 - 08:49 PM
He fails in guiding me to the origin of the error! ;)/>/>

Because he just can't parse the input and don't know why himself.
Or the programmer was just too lazy to implement meaningful error messages…

But the failure was clearly on my side in the first place (like most of the times), as computers work very reliably. :(/>/>