tags:

views:

581

answers:

1

I am taking my first steps programming in Lua and get this error when I run my script:

attempt to index upvalue 'base' (a function value)

It's probably due to something very basic that I haven't grasped yet, but I can't find any good information about it when googling. Could someone explain to me what it means?

+1  A: 

In this case it looks base is a function, but you're trying to index it like a table (eg. base[5] or base.somefield).

The 'upvalue' part is just telling you what kind of variable base is, in this case an upvalue (aka external local variable).

Ah, yes of course - it was as simple as that. In my confusion I missed the obvious. Thanks a lot for your help!
Cactuar