"Lua Cache couldn't be downloaded"

I’m getting a little frustrated with this. Everyone who joins my listen server gets “Lua Cache couldn’t be downloaded. Server is misconfigured.” Because of this, the custom models I downloaded are invisible to people. How do I fix this?

I have resource.addfile to the models I want. I also have sv_allowdownload and sv_allowupload set to zero. If I set it to one, the files just don’t download.

Any advice?

Do you have a FastDL? If So,
What is your sv_downloadurl set to?

Paste the resource.addfile LUA file.

I don’t have a FastDL. Everything is based on my listen server. I don’t have sv_downloadurl set and I have sv_allowdownload set to 0. I was hoping that the people who join my listen server just download the files directly from me.



function AddDir(dir) // recursively adds everything in a directory to be downloaded by client
	local list = file.FindDir("../"..dir.."/*")
	for _, fdir in pairs(list) do
		if fdir != ".svn" then // don't spam people with useless .svn folders
			AddDir(dir.."/"..fdir)
		end
	end
 
	for k,v in pairs(file.Find("../"..dir.."/*")) do
		resource.AddFile(dir.."/"..v)
	end
end

AddDir("addons/odst_drop_pod")

resource.AddFile("")


having sv_allowdownload set to 0 means they aint going to DL jack shit. also im not very good at LUA by any stretch but im sure that having resource.AddFile("") is not going to to anything.

PS: use [lua] tags for LUA Code. it helps the helpers

I was wondering that. But when I have it set to 1, the files that are supposed to be downloaded just stays there, and people are stuck at the “Downloading…” screen.

if sv_allowdownload is set to 1 they will DL the cache for sure. The models and what not id do the long way:

[lua]
– For everything other then lua
resource.addFile(“models/ttt/deerstalker.mdl”) – or
resource.AddFile(“sound/sound1.mp3”)

– or for LUA files
AddCSLuaFile(“autorun/client/luafile.lua”)[/lua]

There’s just way too many files to add manually. Isn’t there another way?

[editline]01:00AM[/editline]

Well. I’m in rage-mode so hard right now.

I just added 100 files manually for a test using “Resource.Addfile(”")."

Here’s my problems:

  1. If I set sv_allowdownload to ONE.

a. All the files I have marked with Resource.Addfile will not even appear and it skips straight to “Sending Client Info…” right after downloading the lua cache.

b. All the files in the directory I have marked with “AddDir(”")" is completely in a stand-still in the loading screen, and no one can download anything. It just freezes and your only option is to click on “Cancel.”

  1. If I set sv_allowdownload to ZERO.

a. All the files I have marked do download whether it be “AddDir” or “Resouce.Addfile,” however, when entering the game, it says that the lua cache couldn’t be downloaded. Also, none of the downloaded models work.

Please note these are difficulties with a listen server and I don’t have a fast DL.

Boy this is frustrating. Any advice?

Ok, well.
where are you putting this LUA file with all the syntax in it? *it should be in lua/autorun/server)

Yup.

Bump.

If there’s no solution, I’ll just wait for a fix to mysteriously appear.

“sv_allowdownload and sv_allowupload set to zero”

Turn them to 1

Doing this makes the files turn into a stand-still. They simply don’t DL.

which files? the custom ones?

Yeah.

Mayby change the sv_maxsize (or what ever it is) to a realy high number?

do this:

  1. sv_allowdownload (and upload) “1”
  2. net_maxfilesize “64”

…Tried that already.

D:

then live without the Custom models?

or learn the lua?

I’m pretty sure it’s a problem in GMod. The lua code already exists, but it doesn’t work.

No?
i use the LUA version for my shit:

[lua]
AddCSLuaFile(“autorun/client/DMenu.lua”)
AddCSLuaFile(“autorun/Var2.lua”)
resource.AddFile(“materials/gui/silkicons/database.vmt”)
resource.AddFile(“materials/gui/silkicons/database.vtf”)
resource.AddFile(“materials/gui/silkicons/server_add.vmt”)
resource.AddFile(“materials/gui/silkicons/server_add.vtf”)
[/lua]

and that is located in lua\autorun\server\Downloads.lua