Help with resource.AddFile, people won't download

:suicide:
I swear this seems right, i put it in my friends GMod server, but nobody downloads it, please help

if (SERVER) then
resource.AddFile( “sound/weapons/hb/boltback.mp3” )
resource.AddFile( “sound/weapons/hb/boltcatch.mp3” )
resource.AddFile( “sound/weapons/hb/boltforward.mp3” )
resource.AddFile( “sound/weapons/hb/hb_fire.wav” )
resource.AddFile( “sound/weapons/hb/magin.mp3” )
resource.AddFile( “sound/weapons/hb/magout.mp3” )
resource.AddFile( “models/weapons/v_aacbadger.mdl” )
resource.AddFile( “models/weapons/w_aac_honeybadger.mdl” )
resource.AddFile( “materials/vgui/hud/aac.vtf” )
resource.AddFile( “materials/vgui/hud/m9k_honeybadger.vmt” )
resource.AddFile( “materials/models/weapons/v_models/honeyb/glass.vmt” )
resource.AddFile( “materials/models/weapons/v_models/honeyb/hb.vmt” )
resource.AddFile( “materials/models/weapons/v_models/honeyb/hb.vtf” )
resource.AddFile( “materials/models/weapons/v_models/honeyb/hbn.vtf” )
resource.AddFile( “materials/models/weapons/v_models/honeyb/sight.vmt” )
resource.AddFile( “materials/models/weapons/v_models/honeyb/sights-up.vmt” )
end

and yes, the paths are correct

Check that the files are definitely on the fastdl and the folders and files on both fastdl server and gmod server have no caps as this can mess with Linux, other than that any errors in server console or client console about not finding the files on the webserver. And although this may seem stupid just check that you have the sv_downloadurl set right.

Take a look how this does it: https://dl.dropboxusercontent.com/u/26074909/tutoring/_zipped_code/acecool_ttt_end_round_music.rar

It does it automatically; look how it adds it with sounds/…/
then it calls them with …/

Make sure your files are in the correct locations; double check they’re being downloaded. If you have fastdl url setup, ensure the folders / files are in correct locations.

Show us what it looks like and we can help further if you’re using fastdl. If not, check my addon, drag and drop it into addons and they should download automatically if you restart the server. Follow the same pattern for your files.

Acecool, I’ve never really spoken to or about you before, but you’re not really helping anyone. Don’t try to “help” by people by advertising your shit and having them go through your somewhat confusing code. You don’t see me or other coders advertising their glorious library everywhere.

Now, to actually help.

This happened to someone else I know. The problem was is that sv_allowdownload wasn’t enabled.
The way your doing resource.AddFile is absolutely fine.
Just asking to rule out other possibilities, where is the lua file saved?

Make sure that the model, materials, sounds, and resource you want them to download are also in garrysmod/

The lua file is saved in lua/autorun/resources and for the shared.lua lua/weapons/shared
And what exactly would it look like if I had the sv_downloads?

sv_allowdownload should ALWAYS be set to 1, No matter what.
Also, the lua files seem to be in the right place.
What is sv_downloadurl set to? If it’s blank then you’re all good. If it’s not, tell me and I’ll tell you what to do next.

Could renaming the resource.lua file help?

I’m not advertising anything; I post tutorials and things I think will help someone with their current problem. If the OP looks at that addon, it’ll give a good idea of where to put what, when, where and how.

If everything is in the correct location, then we can proceed with other debugging methods to help the OP.

As you said, you’ve never spoken to me, so you don’t know what I’m about; don’t assume what you think you know is right, because it isn’t.

The OP says he has a resources file, but no one downloads it. This can be from the file not being included / not being in the right place, fastdl incorrectly configured ( but it would show the user that it is trying to download each time they connect; doesn’t sound like what the OP described ), serverdl incorrectly configured ( may or may not show the user that it is trying to download, I haven’t tried this scenario so it may either act like fastdl being set up incorrectly or it may not show anything ). I’m trying to establish a direct line of communication to figure the problem out as the OP wasn’t clear with everything.

Did you say it is lua/autorun/resources/resource.lua?

The autorun directory will only automatically run files located in these locations:

lua/autorun/.lua = shared
lua/autorun/client/
.lua = client
lua/autorun/server/*.lua = server

or

addons/<addon_name>/lua/autorun/.lua = shared
addons/<addon_name>/lua/autorun/client/
.lua = client
addons/<addon_name>/lua/autorun/server/*.lua = server

If you want to automatically load a file in a sub-folder, such as the current map from an addon:

Whereby the file pasted below is shown here:
addons/<addon_name>/lua/autorun/server/load_map_file.lua

And this is what it will include:
addons/<addon_name>/lua/autorun/server/maps/<map_name>.lua
[lua] local _folder = “autorun/server/maps/”;
local _file = string.lower( game.GetMap( ) ) … “.lua”;
if ( !file.Exists( _folder … _file, “LUA” ) ) then ErrorNoHalt( "Map File not found : " … _folder … _file … "
" ); return; end
include( _folder … _file );[/lua]

If the map files were simply in addons/<addon_name>/lua/autorun/server/maps/*.lua then they wouldn’t be included; the autorun directories aren’t recursively loaded.

Make sure the file is being included; try adding this to the top of your resources.lua file:
[lua]MsgC( Color( 255, 0, 0, 255 ), string.rep( “*”, 150 ) );[/lua]

Not really, I just want to make sure that the structure is as follows:
lua/autorun/resources.lua , correct?
Again tell me what sv_downloadurl is set to, and make sure that sv_allowdownload is set to 1

[editline]17th June 2014[/editline]

To be honest, looking at your post history for the past day or so, it seems like you posted that addon to other people who wanted help. You gave no real explanation and (somehow) expected people to go through your massive comments and your somewhat confusing code. Instead of giving them what they really want, a simple and clear solution to their problem. You give them a giant wall of text, and an entire addon, and that really does nothing but make the person have to work through shit that was bigger than the problem they had in the first place.
My best guess, is that you wanted people to go through your code to see how awesome it was or some shit…(That will not happen any time soon) and hope people use your glorious end round music…thing. I don’t cough up entire workable versions of ARCBank, ARCLib, Displacement Devices, or other of my pre-made works when someone asks for a simple solution. Neither do any other coders on here.
If someone wants a more in-depth answer, they will ask for it. Just remember that most people who want help want a clear, simple, easy to understand solution, with suggestions being less than 2 sentences.
If someone wants some example code, they will want something that’s straight to the point, easy to read, and not filled with “MADE BY ARITZ (CRACKER) BEOBIDE-CARDINAL HURR” everywhere. I see you didn’t spam your name anywhere in your post, Josh, so it seems like you’re improving.

I’m not hating on you, I just want to tell you why a lot of people here are upset about you whenever you offer your “help”.

Yes, I never spoke to you personally, so I can only guess when it comes to your motivations, but what I know for sure are people’s reactions when it comes to you.

I hope I helped both of you today.

Lol fuckit, im gonna make a “Setting up FastDL for complete noobs” tutorial tomorrow.