Hermes
dziwki kola gramy w lola
Hi. There's following situation:
I need function, that will return sum of firstNumber and secondNumber according to value, where "value" matches one of the values in first tables (in this case values are 1 or 2, 3 or 4, 5 or 6).
And what is the best way to do such operations on tables? I mean, to search through multiple tables that are relative to different values?
Thanks in advance & regards and stuff ,
Hermes
Code:
local table = {
{1, 2} = {firstNumber = 150, secondNumber = 20},
{3, 4} = {firstNumber = 120},
{5, 6} = {secondNumber = 80}
}
I need function, that will return sum of firstNumber and secondNumber according to value, where "value" matches one of the values in first tables (in this case values are 1 or 2, 3 or 4, 5 or 6).
And what is the best way to do such operations on tables? I mean, to search through multiple tables that are relative to different values?
Thanks in advance & regards and stuff ,
Hermes