Im going to try to the best of my ability to explain what I am trying to create:
I have a script, that loops through a table, and in those tables is a table called BaseMultipliers. The amount of values in this table can vary, so for one table, BaseMultipliers can be {1,2,3} and another be {1,2}
In this function called calcBoost, it loops through a BaseMultipliers table and multiplies each value by the players stats, and inserts those new values into the newboosts table which then gets returned.
Next I use string.format to format the Description value in the same table the BaseMultipliers table came from, calling the calcBoost function through unpack.
However, the game turns up this error:
I know the function is responsible for this, because before, I just unpacked the BaseMultipliers table and it worked perfectly (displaying static values instead of updating with the players boosts)
Heres the code for it:
local function calcBoost()
local newboosts = {}
for i,v in Boost do
local Multiplier = v * PlayerRunes[name].Value
table.insert(newboosts, Multiplier)
return newboosts
end
end
frame.Boost.Text = string.format(Description, unpack(calcBoost()))
Hopefully I explained this well enough
EDIT: Boost is BaseMultipliers