Client Sided files not downloading.

Well, when a player joins my server there is some models, textures, and lua files they have to download. These files include a cl_init.lua in which contains all of the client sided code for my gamemode. For some odd reason it does not appear to be downloading to any connected clients. When downloading they say that it seems to transfer very fast, and when they reconnect they have to download all of the files once again. There is no client sided, or server sided errors that are visible. All of the models in the server are either errors or a shadow for the player. I’m quite tired of this and would like some help in resolving this issue.

The only code I use for downloading is as followed.

If anymore details are needed I will post them on request.

[lua]
AddCSLuaFile( “cl_init.lua” )
AddCSLuaFile( “shared.lua” )
AddCSLuaFile( “metafunc.lua” )
AddCSLuaFile( “player.lua” )
AddCSLuaFile( “chat.lua” )
AddCSLuaFile( “saving.lua” )
AddCSLuaFile( “server.lua” )
AddCSLuaFile( “inventory.lua” )

include( ‘shared.lua’ )
include( ‘metafunc.lua’ )
include( ‘player.lua’ )
include( ‘chat.lua’ )
include( ‘server.lua’ )

function AddDir(dir)
local list = file.FindDir("…/"…dir…"/*")
for _, fdir in pairs(list) do
if fdir != “.svn” then
AddDir(fdir)
end
end

for k,v in pairs(file.Find("../"..dir.."/*")) do
	resource.AddFile(dir.."/"..v)
end

end

AddDir(“models/nater”)
AddDir(“models/Tysn”)
AddDir(“models/zak_wiet”)
AddDir(“materials/Tysn”)
AddDir(“materials/models/nater”)
AddDir(“materials/gui/silkicons”)
[/lua]

remove sv_downloadurl “” from your server.cfg

if you have it, that is. If you dont have the files at that location, they won’t download to the client and it will appear to try every time they join.

Thank you.

yw :slight_smile:

If that didn’t help and the problem still occurs. I find (as a noob to lua myself) that for some reason, if there is an error in one of my lua files, it and others it includes (if it is the only place) will not download. So scan over your lua’s and make sure you don’t have any errors (like missing ends and any other issues)