"util.KeyValuesToTable" Changed the way it works?

[lua]Radio = vgui.Create(“HTML”)
Radio:SetVisible(false)
Radio:OpenURL(util.KeyValuesToTable(file.Read(“radio/radio.txt”, “DATA”))[“1”].url)[/lua]

“data/radio/radio.txt”


"Out"
{
	"1"
	{
		"name"		"Maxima"
		"url"		"http://www.maxima.fm/multimedia/radios.html"
	}
}

Im trying to make a radio system and im getting this error while trying to get the URL from the file.

ERROR:


3: attempt to index a nil value

Where i went wrong?

I used this and it worked.

radio.txt contents:
[lua]
“Out”{
“1”{
“name” “Maxima”
“url” “http://www.maxima.fm/multimedia/radios.html
}
}
[/lua]

Lua code:
[lua]
local tbl = (util.KeyValuesToTable(file.Read(“radio.txt”, “DATA”)))
print(tbl[1].url)
[/lua]

[1], [“1”] thats my fault, thx :slight_smile: