Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: madsherlock on January 04, 2007, 03:38:58 PM
-
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) ;D
-
Show us the error it's having on end.lua
-
k, heres the error in the srcds console if thats the one you mean. It loads up normally and then it freezez for a couple of minutes when loading end.lua:
[ULIB] Loading module: ulx_init.lua
//////////////////////////////
// ULX //
//////////////////////////////
// Loading... //
// base.lua //
// util.lua //
// fun.lua //
// cleanup.lua //
// menu_skin.lua //
// menus.lua //
// vote.lua //
// ulib_plugin.lua //
// timed.lua //
// log.lua //
// end.lua //
(And it just stops doing anything here..)
(Then after about 5 minutes it just skips it and continues..)
Lua error: not enough memory
(Continuing with loading the server..)
But Im pretty sure its only a problem if there's forcedownload. Cuz when I remove the lines with forcedownload from end.lua theres no problem. Except that people cant download the files XO
I don't know how to fix it? Could it be something with the .res file ?
-
If the files I want clients to download have a ztmp file with the same name.
Does the ztmp file mean that its a "forcedownload" file ?