JFD
Kathigitarkh
I'm looking to make a more dynamic TopPanel, so that modders (i.e. me) can add new Yield Per Turn values without complicated workarounds that potentially conflict with other mods. To do this, though, I need to interpret a string as a function, and I'm not sure how to properly use loadstring, or whether it works fully in this game. So it would be much appreciated if someone can enlighten me as to whether this is possible. Thanks.
This is what I have:
This is the error:
This is what I have:
Code:
local numGold = loadstring("JFD_Test" .. "()")()
iGoldPerTurn = iGoldPerTurn + numGold
This is the error:
Code:
attempt to perform arithmetic on local 'numGold' (a function value)