I'm working on this module, which is invoked from a template, which is called on an article with data
{{Test|c1=20|bp1=2|tk1=5|c2=40|tk2=10xp2=2000|...}}
I know how to work through the parent arguments and etc. I just wanna know how I can return the value of total "c", "tk", "xp", etc. (providing all are numbers. I wanna know how to write the iterative function using for i,v in ipairs(???)
or any other way.
I want the data to return like this:
c | bp | tk | xp | cumulative c | cumulative tk | cumulative bp | cumulative xp |
---|---|---|---|---|---|---|---|
20 | 2 | 5 | 0 | 20 | 5 | 2 | 0 |
40 | 0 | 10 | 2000 | 40 | 15 | 2 | 2000 |