A little bit of help with http.Fetch

Hi. I’m trying to get my ranks to store on my site in a txt.
This is my txt.


ranks = {
	{Name = "Someone Else",SteamID = "STEAM_0:0:0",rank = 0},
	{Name = "This Guy.",SteamID = "STEAM_0:0:0",rank = 0},

	{Name = "Someone",SteamID = "STEAM_0:0:0", rank = 1},

        {Name = "Me",SteamID = "STEAM_0:0:0",rank = 3},
}


and this is how I’m fetching it.



function LoadRank(Player)
	ranks = ""

	http.Fetch("http://mywebsite/admins.txt",function(body,len,headers,code)
	ranks = body
	for k,v in pairs(ranks) do
		if Player:SteamID() == ranks[v].SteamID then
			SetRank(Player,ranks[v].rank)
		end
	end

	end)

end



And it throws this error.



[ERROR] addons/admin/lua/ranks.lua:160: bad argument #1 to 'pairs' (table expected, got string)


So I guess I need to know how to fetch admins.txt as a table instead of a string.

The error is quite direct you know.

I suggest you get to know these:

or