Can some one help me with this?

I have this code, but i don’t know why it don’t work

[lua]
if SERVER then
local filescount = 0

--List of files
	list.Add( "blueberry_content", "models/trabbi" )
--List of files

--List of formats
	list.Add( "blueberry_content_formats", ".vmt" )
	list.Add( "blueberry_content_formats", ".vtf" )
	list.Add( "blueberry_content_formats", ".mdl" )
	list.Add( "blueberry_content_formats", ".phy" )
	list.Add( "blueberry_content_formats", ".vvd" )
	list.Add( "blueberry_content_formats", ".dx80.vtx" )
	list.Add( "blueberry_content_formats", ".dx90.vtx" )
	list.Add( "blueberry_content_formats", ".sw.vtx" )
	list.Add( "blueberry_content_formats", ".xbox.vtx" )
	list.Add( "blueberry_content_formats", ".vmt.ztmp" )
	list.Add( "blueberry_content_formats", ".vtf.ztmp" )
	list.Add( "blueberry_content_formats", ".mdl.ztmp" )
	list.Add( "blueberry_content_formats", ".phy.ztmp" )
	list.Add( "blueberry_content_formats", ".vvd.ztmp" )
	list.Add( "blueberry_content_formats", ".dx80.vtx.ztmp" )
	list.Add( "blueberry_content_formats", ".dx90.vtx.ztmp" )
	list.Add( "blueberry_content_formats", ".sw.vtx.ztmp" )
	list.Add( "blueberry_content_formats", ".xbox.vtx.ztmp" )
--List of formats

for k, v in pairs(list.Get("blueberry_content")) do
	for k2, v2 in pairs(list.Get("blueberry_content_formats")) do
		if (file.Exists(v..v2) ) then
			resource.AddFile(v..v2)
			local filescount = fliescount + 1
		end
	end
end

Msg("blueberry.Content: "..filescount.." files at download list

")
end
[/lua]

It should add the fild to downloads but it don’t work, where is the problem?

What exactly are you trying to do?

Yes something like this but not excessive like resource.adddir

So, what exactly do you need?

I’m confused.

now im doing it by other way…
How can i make a table with every line from a txt file?

… I have no idea what the fuck you’re trying to do. Sorry.

[lua]
–Materials
local materials = file.Read(“data/contents/materials.txt”)
for _, f in pairs(materials) do
if file.Exists(f…".vmt") then
resource.AddFile(f…".vmt")
local vmtfiles = vmtfiles + 1
end
if file.Exists(f…".vtf") then
resource.AddFile(f…".vtf")
local vmffiles = vmffiles + 1
end
end
[/lua]
Im doing this to add the name of the material to a txt file and then the server will add it to resources… but i need the last one y requested :frowning:

Why make it so complicated? Just do as I do in my tutorial/on The Wiki.

well thx…
I will use this http://www.facepunch.com/showthread.php?t=842886