(03-07-2011, 12:04 AM)Tim Wrote: Sorry im bumping an old thread but thought it would be silly to make a new one
Is there a way to cycle through all the keys in an ini file and output the key name and the values within it?
Sample code:
PHP Code:
for keyID = 0,IniFile:GetNumKeys()-1 do
for valID = 0,IniFile:GetNumValues(keyID)-1 do
Log("keyID = " .. keyID .. ", valID = " .. valID .. ", " .. IniFile:GetValue(keyID, valID))
Log("keyName = " .. IniFile:GetKeyName(keyID))
Log("valName = " .. IniFile:GetValueName(keyID, valID))
end
end