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

<pre><code>attempt to index upvalue 'base' (a function value)
</code></pre>

<p>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?</p>

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).