So i would like to calculate all the numbers on one row in a table (the table only has numbers in it).
What is the easiest way of doing that do you think?
Comments
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 11,949
edited December 2017
I assume you want a sum of all of the cells in a row? You can Loop over Table and change self.sum to self.sum+tableCellValue(name,1,self.col) and use self.col as the Loop index. Or you can put your values in columns and use the tableColSum() function.
Demo attached. I swear I didn't intentionally pick numbers that add up to the answer to the ultimate question of life, the universe and everything.
Comments
I assume you want a sum of all of the cells in a row? You can Loop over Table and change self.sum to self.sum+tableCellValue(name,1,self.col) and use self.col as the Loop index. Or you can put your values in columns and use the tableColSum() function.
Demo attached. I swear I didn't intentionally pick numbers that add up to the answer to the ultimate question of life, the universe and everything.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Well thats just fantastic fella. I tip my hat to you sir...