• resource.AddFile() Issue
    2 replies, posted
So I have set up code which iterates and adds a bunch of files for the client to download and that works fine. The files are added as supposed to be in a folder whose path is garrysmod/download/materials/vgui/pt/ and the upon joining the server it says the files added are being downloaded on the loading screen. Upon spawning in the server the files are not loaded. I check the garrysmod/download/materials/vgui/ folder to find that the directory 'pt' has not been created at all neither have the files be added into garrysmod/download/materials/vgui/pt/. After searching the entire garrysmod folder I found no sign of the downloaded files. The code I use to add the files is a modification of an iteration code: [code] local function ProcessFolder( t_Location ) local t_Files, t_Directories = file.Find( t_Location .. "*", "GAME" ) local t_Filter = { "db", "vvd", "phy", "vtx", "png" } for _, t_File in pairs( t_Files ) do if ( !table.HasValue( t_Filter, string.GetExtensionFromFilename( t_File ) ) ) then resource.AddFile( string.Replace( t_Location, "gamemodes/gamemode/content/", "" ) .. t_File ) MsgN( "resource.AddFile( '" .. string.Replace( t_Location, "gamemodes/gamemode/content/", "" ) .. t_File .. "' )" ) end end for _, t_Directory in pairs( t_Directories ) do ProcessFolder( string.Replace( t_Location, "gamemodes/gamemode/content/", "" ) .. t_Directory .. "/", t_Total ) MsgN( "Found directory: '" .. t_Directory .. "'." ) end end ProcessFolder( "gamemodes/gamemode/content/materials/vgui/pt/" ) [/code] If this info helps any: This issue started after the latest Gmod update. Prior to the update this code worked fine.
Post a console log from starting up GMod to joining the server
server console: [img]http://hwmservers.site11.com/images/console.png[/img] Skipping all the ULX stuff. developer console: [code] Initializing Awesomium.. No Kinect SDK Not playing a local game. Addons have changes - remounting NAUGHTY SERVER: NFOservers.com - New server ( Sandbox ) WARNING: Port 27015 was unavailable - bound to port 27016 instead WARNING: Port 27005 was unavailable - bound to port 27006 instead WARNING: Port 27020 was unavailable - bound to port 27021 instead Network: IP XXX.XXX.X.X, mode MP, dedicated No, ports 27016 SV / 27006 CL Connecting to XXX.XXX.X.X:27015... Connected to XXX.XXX.X.X:27015 Poison Tag Map: gm_construct Players: 1 / 16 Build: 6004 Server Number: 1 Holywiremod's Test Server http://hwmservers.host.com/loading/ gamemode gm_construct 16 XXXXXXXXXXXXXXXXX Requesting 12 lua files from the server ConVarRef pac_modifier_size doesn't point to an existing ConVar ConVarRef pac_modifier_model doesn't point to an existing ConVar ConVarRef pac_sv_hide_outfit_on_death doesn't point to an existing ConVar ConVarRef pac_sv_draw_distance doesn't point to an existing ConVar ConVarRef pac_restrictions doesn't point to an existing ConVar ConVarRef pac_sv_projectiles doesn't point to an existing ConVar ConVarRef gmod_physiterations doesn't point to an existing ConVar PREP OK Warning: WorldTwoTextureBlend found on a non-displacement surface (material: gm_construct/flatgrass). This wastes perf for no benefit. clientside lua startup! [LibK] Loading SHARED file: 0_sh_middleclass.lua [LibK] Loading SHARED file: 1_sh_promises.lua [LibK] Loading SHARED file: 2_sh_libk.lua [LibK] Loading SHARED file: sh_addonloader.lua [LibK] Loading SHARED file: sh_debug.lua [LibK] Loading SHARED file: sh_easing.lua [LibK] Loading SHARED file: sh_kplayer.lua [LibK] Loading SHARED file: sh_logger.lua [LibK] Loading SHARED file: sh_permissioninterface.lua [LibK] Loading SHARED file: sh_singleton.lua [LibK] Loading SHARED file: sh_thirdparty.lua [LibK] Loading SHARED file: sh_util.lua [LibK] Loading CLIENT file: cl_dcenteredimage.lua [LibK] Loading CLIENT file: cl_drtmodelpanel.lua [LibK] Loading CLIENT file: cl_dsplitpanel.lua [LibK] Loading CLIENT file: cl_libk_baseview.lua [LibK] Loading CLIENT file: cl_libk_client.lua [LibK] Loading CLIENT file: cl_libk_dermaskin.lua [LibK] Loading CLIENT file: cl_libk_gradient.lua [LibK] Loading CLIENT file: cl_libk_kpropertysheet.lua LibK by Kamshak loaded Unable to read particle definition particles/ambient_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/blood_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/boomer_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/charger_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/electrical_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/environmental_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/explosions_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/fire_01l4d.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/fire_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/fire_infected_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/firework_crate_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/fireworks_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/footstep_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/gen_dest_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/hunter_fx.pcf! UtlBuffer is the wrong type! unrecognized conditional test GPU<2?$STARTFADESIZE in particle/vistasmokev1_min_depth_nearcull unrecognized conditional test GPU<2?$ENDFADESIZE in particle/vistasmokev1_min_depth_nearcull unrecognized conditional test GPU<2?$BLENDFRAMES in particle/vistasmokev1_min_depth_nearcull unrecognized conditional test GPU<2?$DEPTHBLEND in particle/vistasmokev1_min_depth_nearcull Unable to read particle definition particles/infected_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/inferno_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/insect_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/lighting.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/locator_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/military_artillery_impacts.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/overhead_icon_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/rain_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/rain_storm_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/rope_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/screen_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/smoker_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/spitter_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/steam_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/steamworks.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/survivor_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/tank_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/tanker_explosion.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/test_collision.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/test_distancealpha.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/ui_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/vehicle_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/water_fx.pcf! UtlBuffer is the wrong type! Unable to read particle definition particles/witch_fx.pcf! UtlBuffer is the wrong type! Pointshop2 Version 596 : 76561197999952662 loaded You are running ULib version 2.60. [ULIB] Loading SHARED module: ulx_init.lua [ULX] Loading CLIENT module: motdmenu.lua [ULX] Loading CLIENT module: uteam.lua [ULX] Loading CLIENT module: xgui_client.lua [ULX] Loading CLIENT module: xgui_helpers.lua [ULX] Loading CLIENT module: xlib.lua [ULX] Loading SHARED module: chat.lua [ULX] Loading SHARED module: fun.lua [ULX] Loading SHARED module: menus.lua [ULX] Loading SHARED module: rcon.lua [ULX] Loading SHARED module: sh_pointshop2.lua [ULX] Loading SHARED module: teleport.lua [ULX] Loading SHARED module: user.lua [ULX] Loading SHARED module: userhelp.lua [ULX] Loading SHARED module: util.lua [ULX] Loading SHARED module: vote.lua Requesting texture value from var "$dummyvar" which is not a texture value (material: NULL material) Failed to load custom font file 'c:/program files (x86)/steam/steamapps/username/garrysmod/garrysmod/resource/fonts/cambria.ttf' Failed to load custom font file 'c:/program files (x86)/steam/steamapps/username/garrysmod/garrysmod/resource/fonts/segoeui.ttf' Failed to load custom font file 'c:/program files (x86)/steam/steamapps/username/garrysmod/garrysmod/resource/fonts/segoeuil.ttf' Failed to load custom font file 'c:/program files (x86)/steam/steamapps/username/garrysmod/garrysmod/resource/fonts/segoeuisl.ttf' Failed to load custom font file 'c:/program files (x86)/steam/steamapps/username/garrysmod/garrysmod/resource/fonts/seguisb.ttf' Hey '??&#65533;holy&#65533;??' - You're in the 'admin' group on this server. Client "&#3665;&#1769;†Holy†&#1769;&#3665;" spawned in server <STEAM_0:0:XXXXXXXX> (took 17 seconds). Welcome to Holywiremod's Test Server
Sorry, you need to Log In to post a reply to this thread.