I have a problem with the forcedownload function.
When people connect to my srcds server, they don't download the files they should be downloading.
I put all the links to the files in the forcedownload.ini from the ulx mod. An I am pretty sure I did it the right way. I did the seperate lines and quotes thing.
Example:
"models/blah/blah.mdl"
"blah/blah/blah.vtf"
But thats not the problem.
I have installed the portal mod pack. It includes a swep, a new item (portal cube) and an edited npc (turret).
It includes a lot of models and materials wich i have installed the right way.
But when I start my server it stops when loading ulx.
It stops at end.lua.
I am pretty sure its because in the bottom of end.lua it says:
-- Download menus to client
ULib.forceDownload( "materials/ULib/menu.vtf" )
ULib.forceDownload( "materials/ULib/menu.vmt" )
ULib.forceDownload( "materials/ulx/title.vtf" )
ULib.forceDownload( "materials/ulx/title.vmt" )
Im not sure if I'm correct but I think the ulx forcedownload.ini uses the ulb forcedownload function?
Cuz in end.lua it says this:
-- This takes care of the things in the configs directory.
if not _file.Exists( "lua/ulx/configs/forcedownload.ini" ) then
ULib.print( "[ULX] ERROR: The forcedownload.ini file is missing!" )
else
local file = ULib.stripComments( _file.Read( "lua/ulx/configs/forcedownload.ini" ), "//" )
local lines = ULib.explode( file, "\n+" )
for _, line in pairs( lines ) do
local data = ULib.stripQuotes( string.gsub( line, "^.*(%b\"\").*$", "%1" ) )
if data and data ~= "" then
ULib.forceDownload( data )
end
end
end
I tried removing those two parts of end.lua, and then my server does not freeze when starting. But then, of course, people can't download the stuff.
One other thing I tried was to put a .lua file in the lua/init/ folder. I called it portaldownloads.lua and heres how I made it.
_OpenScript( "ULib/init.lua" )
ULib.forceDownload( "models/blah/justanexample.mdl" )
ULib.forceDownload( "materials/justanexample.vmt" )
I really hope, I can get serious help so..
Anybody know how I can make the forcedownload function work? (Make clients download the necessary files for the Portal pack)