Basically I'd like to get the value from a setting an ini file.
E.G
[Items]
Metal Ore=250
I'd like to get "250".
This is what I have at the moment:
At the moment it works, But it will print out:
Metal Ore=2
Metal Ore=5
Metal Ore=0
I want it to print: Metal Ore=250
Anyone got any ideas?
I've never really worked with looping in a file before
E.G
[Items]
Metal Ore=250
I'd like to get "250".
This is what I have at the moment:
Python:
keys = Plugin.GetIni("Settings").EnumSection("Items")
setting = Plugin.GetIni("Settings").GetSetting
Util.Log("----------------------------")
for key in keys:
for amount in setting("Items", key):
Util.Log(key + "=" + amount)
Util.Log("----------------------------")
Metal Ore=2
Metal Ore=5
Metal Ore=0
I want it to print: Metal Ore=250
Anyone got any ideas?
I've never really worked with looping in a file before