|
>So, there doesn't seem to be any issue in doing arithmetic with table fields !!Correct there is not, although this is not what you are doing.
This is a self call which is sent three parameters not two, the first being the self instance ie a Table.Your print statement also highlights this when you call print(tax:getIncome(), tax:getRate())table: 0028CA00 12200May I suggest you look at using metatables, possibly reading 16.1 in PiL 3rd edition or 4th edition, or maybe a wiki entry[1]