So I went ahead and made the mistake of implementing a big feature with multiple components without testing and building slowly. So now I'm stuck bug fixing this kind of rickety thing.
My current issue that's kind of abstract, that I'm hoping someone has encountered before, or can interpret what I fail to see is this error:
attempt to perform arithmetic on local 'parametername' (a table value)
What's supposed to be happening is that I'm passing a value of a table (e.g. tab.x) into a function, which I know is perfectly fine to do, so does anyone know exactly what that error means in layman's terms? Am I accidentally passing a table and performing arithmetic on it or is there some specific lua issue I'm missing?
A Vague Question...?
Re: A Vague Question...?
That's exactly what's happening. It's trying to do math with a table (e.g. tableValue + 5), but, for obvious reasons, cannot. The error specifies that it's a local variable, so it's either an argument or defined locally within the function itself.
- dizzykiwi3
- Citizen
- Posts: 58
- Joined: Tue Jan 14, 2014 2:03 am
Re: A Vague Question...?
So how can I get around this? What exactly is the difference between a table value and the value itself?
- dizzykiwi3
- Citizen
- Posts: 58
- Joined: Tue Jan 14, 2014 2:03 am
Re: A Vague Question...?
Am I misunderstanding what a table value is? Is a table value this:
> print(t)
table: 0035AE18
or the value of a key within a table?
> print(t)
table: 0035AE18
or the value of a key within a table?
- dizzykiwi3
- Citizen
- Posts: 58
- Joined: Tue Jan 14, 2014 2:03 am
Re: A Vague Question...?
God dammit I was passing a table, right at the very top of the chain, god dammit xD thanks for help clarifying it
Who is online
Users browsing this forum: Bing [Bot] and 2 guests