Force download problem

I created a force download lua file and placed it in lua/autorun/server but when someone join’s my server, they download nothing.

My lua file is called “downloads.lua”

here’s the code

[lua]

resource.AddFile(“addons/MW Vehicles/materials/vgui/entities/golf gti.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/vgui/entities/golf.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/badges.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/badges.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/black.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/black.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/bottom.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/bottom.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/brake_disk2.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/brake_disk.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/brake_disk.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/chrome.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/chrome.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/front_light.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/front_light.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/glass.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/glass.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/glass_inside.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/glass_inside.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/interior.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/interior.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/misc.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/misc.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/misc_mask.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/rear_light.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/rear_light.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/skin1.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/skin1.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/skin2.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/skin2.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/skin3.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/skin3.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/tire.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/tire.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/trace.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/trace.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/wheel.vmt”)
resource.AddFile(“addons/MW Vehicles/materials/golf/wheel.vtf”)
resource.AddFile(“addons/MW Vehicles/materials/golf/wheel_mask.vtf”)
resource.AddFile(“addons/MW Vehicles/models/golf/golf.dx80.vtx”)
resource.AddFile(“addons/MW Vehicles/models/golf/golf.dx90.vtx”)
resource.AddFile(“addons/MW Vehicles/models/golf/golf.mdl”)
resource.AddFile(“addons/MW Vehicles/models/golf/golf.phy”)
resource.AddFile(“addons/MW Vehicles/models/golf/golf.sw.vtx”)
resource.AddFile(“addons/MW Vehicles/models/golf/golf.vvd”)

[/lua]

Can someone please help?

Edit:
I removed addons/MW Vehicles/ and players were able to download the files, but they still see errors.

You’ve got the code correct. Did you restart the server?

Yes, I’ve restarted the server after the file was put into the FTP.

It’s in the right place too yes?

garrysmod/lua/autorun/server

correct?

That’s the thing I don’t know, are you testing this on a clean gmod?

Yeah, I’m really not sure why this isn’t working. It’s really pissing me off at the moment.

Yup.

Ugh… any idea on how to fix this then?

Updated my file to this

[lua]
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(fdir)
end
end

for k,v in pairs(file.Find("…/"…dir…"/*")) do
resource.AddFile(dir…"/"…v)
end
end
AddDir(“models/sickness”)
AddDir(“materials/models/sickness”)
AddDir(“materials/golf”)
AddDir(“materials/vgui”)
AddDir(“models/golf”)

// Golf
resource.AddFile(“materials/vgui/entities/golf gti.vmt”)
resource.AddFile(“materials/vgui/entities/golf.vtf”)
resource.AddFile(“materials/golf/badges.vmt”)
resource.AddFile(“materials/golf/badges.vtf”)
resource.AddFile(“materials/golf/black.vmt”)
resource.AddFile(“materials/golf/black.vtf”)
resource.AddFile(“materials/golf/bottom.vmt”)
resource.AddFile(“materials/golf/bottom.vtf”)
resource.AddFile(“materials/golf/brake_disk2.vtf”)
resource.AddFile(“materials/golf/brake_disk.vmt”)
resource.AddFile(“materials/golf/brake_disk.vtf”)
resource.AddFile(“materials/golf/chrome.vmt”)
resource.AddFile(“materials/golf/chrome.vtf”)
resource.AddFile(“materials/golf/front_light.vmt”)
resource.AddFile(“materials/golf/front_light.vtf”)
resource.AddFile(“materials/golf/glass.vmt”)
resource.AddFile(“materials/golf/glass.vtf”)
resource.AddFile(“materials/golf/glass_inside.vmt”)
resource.AddFile(“materials/golf/glass_inside.vtf”)
resource.AddFile(“materials/golf/interior.vmt”)
resource.AddFile(“materials/golf/interior.vtf”)
resource.AddFile(“materials/golf/misc.vmt”)
resource.AddFile(“materials/golf/misc.vtf”)
resource.AddFile(“materials/golf/misc_mask.vtf”)
resource.AddFile(“materials/golf/rear_light.vmt”)
resource.AddFile(“materials/golf/rear_light.vtf”)
resource.AddFile(“materials/golf/skin1.vmt”)
resource.AddFile(“materials/golf/skin1.vtf”)
resource.AddFile(“materials/golf/skin2.vmt”)
resource.AddFile(“materials/golf/skin2.vtf”)
resource.AddFile(“materials/golf/skin3.vmt”)
resource.AddFile(“materials/golf/skin3.vtf”)
resource.AddFile(“materials/golf/tire.vmt”)
resource.AddFile(“materials/golf/tire.vtf”)
resource.AddFile(“materials/golf/trace.vmt”)
resource.AddFile(“materials/golf/trace.vtf”)
resource.AddFile(“materials/golf/wheel.vmt”)
resource.AddFile(“materials/golf/wheel.vtf”)
resource.AddFile(“materials/golf/wheel_mask.vtf”)
resource.AddFile(“models/golf/golf.dx80.vtx”)
resource.AddFile(“models/golf/golf.dx90.vtx”)
resource.AddFile(“models/golf/golf.mdl”)
resource.AddFile(“models/golf/golf.phy”)
resource.AddFile(“models/golf/golf.sw.vtx”)
resource.AddFile(“models/golf/golf.vvd”)

// Lambo
resource.AddFile(“materials/models/sickness/0000.vmt”)
resource.AddFile(“materials/models/sickness/0000.vtf”)
resource.AddFile(“materials/models/sickness/0001.vmt”)
resource.AddFile(“materials/models/sickness/0001.vtf”)
resource.AddFile(“materials/models/sickness/0004.vmt”)
resource.AddFile(“materials/models/sickness/0004.vtf”)
resource.AddFile(“materials/models/sickness/0005.vmt”)
resource.AddFile(“materials/models/sickness/0005.vtf”)
resource.AddFile(“materials/models/sickness/0006.vmt”)
resource.AddFile(“materials/models/sickness/0006.vtf”)
resource.AddFile(“materials/models/sickness/0007.vmt”)
resource.AddFile(“materials/models/sickness/0007.vtf”)
resource.AddFile(“materials/models/sickness/0011.vmt”)
resource.AddFile(“materials/models/sickness/0011.vtf”)
resource.AddFile(“materials/models/sickness/0021.vmt”)
resource.AddFile(“materials/models/sickness/0021.vtf”)
resource.AddFile(“materials/models/sickness/0031.vmt”)
resource.AddFile(“materials/models/sickness/0031.vtf”)
resource.AddFile(“models/sickness/murcigla.vmt”)
resource.AddFile(“models/sickness/murcigla.vtf”)
resource.AddFile(“models/sickness/murciglass.vmt”)
resource.AddFile(“models/sickness/murciglass.vtf”)
resource.AddFile(“models/sickness/murcielago.dx80.vtx”)
resource.AddFile(“models/sickness/murcielago.dx90.vtx”)
resource.AddFile(“models/sickness/murcielago.mdl”)
resource.AddFile(“models/sickness/murcielago.phy”)
resource.AddFile(“models/sickness/murcielago.sw.vtx”)
resource.AddFile(“models/sickness/murcielago.vvd”)
//resource.AddFile(“sound/lambohorn.wav”)
//resource.AddFile(“sound/vehicles/lambo2/crash.wav”)
//resource.AddFile(“sound/vehicles/lambo2/distantoff.wav”)
//resource.AddFile(“sound/vehicles/lambo2/distanton.wav”)
//resource.AddFile(“sound/vehicles/lambo2/doorclose1.wav”)
//resource.AddFile(“sound/vehicles/lambo2/dooropen1.wav”)
//resource.AddFile(“sound/vehicles/lambo2/fourth_cruise_loop2.wav”)
//resource.AddFile(“sound/vehicles/lambo2/limitedspeed.wav”)
//resource.AddFile(“sound/vehicles/lambo2/limitedspeedoff.wav”)
//resource.AddFile(“sound/vehicles/lambo2/rev.wav”)
//resource.AddFile(“sound/vehicles/lambo2/second.wav”)
//resource.AddFile(“sound/vehicles/lambo2/skid_highfriction.wav”)
//resource.AddFile(“sound/vehicles/lambo2/skid_lowfriction.wav”)
//resource.AddFile(“sound/vehicles/lambo2/skid_normalfriction.wav”)
//resource.AddFile(“sound/vehicles/lambo2/startup.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)
//resource.AddFile(“sound/vehicles/lambo2/third.wav”)

util.PrecacheModel(“materials/vgui/entities/golf gti.vmt”)
util.PrecacheModel(“materials/vgui/entities/golf.vtf”)
util.PrecacheModel(“materials/golf/badges.vmt”)
util.PrecacheModel(“materials/golf/badges.vtf”)
util.PrecacheModel(“materials/golf/black.vmt”)
util.PrecacheModel(“materials/golf/black.vtf”)
util.PrecacheModel(“materials/golf/bottom.vmt”)
util.PrecacheModel(“materials/golf/bottom.vtf”)
util.PrecacheModel(“materials/golf/brake_disk2.vtf”)
util.PrecacheModel(“materials/golf/brake_disk.vmt”)
util.PrecacheModel(“materials/golf/brake_disk.vtf”)
util.PrecacheModel(“materials/golf/chrome.vmt”)
util.PrecacheModel(“materials/golf/chrome.vtf”)
util.PrecacheModel(“materials/golf/front_light.vmt”)
util.PrecacheModel(“materials/golf/front_light.vtf”)
util.PrecacheModel(“materials/golf/glass.vmt”)
util.PrecacheModel(“materials/golf/glass.vtf”)
util.PrecacheModel(“materials/golf/glass_inside.vmt”)
util.PrecacheModel(“materials/golf/glass_inside.vtf”)
util.PrecacheModel(“materials/golf/interior.vmt”)
util.PrecacheModel(“materials/golf/interior.vtf”)
util.PrecacheModel(“materials/golf/misc.vmt”)
util.PrecacheModel(“materials/golf/misc.vtf”)
util.PrecacheModel(“materials/golf/misc_mask.vtf”)
util.PrecacheModel(“materials/golf/rear_light.vmt”)
util.PrecacheModel(“materials/golf/rear_light.vtf”)
util.PrecacheModel(“materials/golf/skin1.vmt”)
util.PrecacheModel(“materials/golf/skin1.vtf”)
util.PrecacheModel(“materials/golf/skin2.vmt”)
util.PrecacheModel(“materials/golf/skin2.vtf”)
util.PrecacheModel(“materials/golf/skin3.vmt”)
util.PrecacheModel(“materials/golf/skin3.vtf”)
util.PrecacheModel(“materials/golf/tire.vmt”)
util.PrecacheModel(“materials/golf/tire.vtf”)
util.PrecacheModel(“materials/golf/trace.vmt”)
util.PrecacheModel(“materials/golf/trace.vtf”)
util.PrecacheModel(“materials/golf/wheel.vmt”)
util.PrecacheModel(“materials/golf/wheel.vtf”)
util.PrecacheModel(“materials/golf/wheel_mask.vtf”)
util.PrecacheModel(“models/golf/golf.dx80.vtx”)
util.PrecacheModel(“models/golf/golf.dx90.vtx”)
util.PrecacheModel(“models/golf/golf.mdl”)
util.PrecacheModel(“models/golf/golf.phy”)
util.PrecacheModel(“models/golf/golf.sw.vtx”)
util.PrecacheModel(“models/golf/golf.vvd”)
util.PrecacheModel(“materials/models/sickness/0000.vmt”)
util.PrecacheModel(“materials/models/sickness/0000.vtf”)
util.PrecacheModel(“materials/models/sickness/0001.vmt”)
util.PrecacheModel(“materials/models/sickness/0001.vtf”)
util.PrecacheModel(“materials/models/sickness/0004.vmt”)
util.PrecacheModel(“materials/models/sickness/0004.vtf”)
util.PrecacheModel(“materials/models/sickness/0005.vmt”)
util.PrecacheModel(“materials/models/sickness/0005.vtf”)
util.PrecacheModel(“materials/models/sickness/0006.vmt”)
util.PrecacheModel(“materials/models/sickness/0006.vtf”)
util.PrecacheModel(“materials/models/sickness/0007.vmt”)
util.PrecacheModel(“materials/models/sickness/0007.vtf”)
util.PrecacheModel(“materials/models/sickness/0011.vmt”)
util.PrecacheModel(“materials/models/sickness/0011.vtf”)
util.PrecacheModel(“materials/models/sickness/0021.vmt”)
util.PrecacheModel(“materials/models/sickness/0021.vtf”)
util.PrecacheModel(“materials/models/sickness/0031.vmt”)
util.PrecacheModel(“materials/models/sickness/0031.vtf”)
util.PrecacheModel(“models/sickness/murcigla.vmt”)
util.PrecacheModel(“models/sickness/murcigla.vtf”)
util.PrecacheModel(“models/sickness/murciglass.vmt”)
util.PrecacheModel(“models/sickness/murciglass.vtf”)
util.PrecacheModel(“models/sickness/murcielago.dx80.vtx”)
util.PrecacheModel(“models/sickness/murcielago.dx90.vtx”)
util.PrecacheModel(“models/sickness/murcielago.mdl”)
util.PrecacheModel(“models/sickness/murcielago.phy”)
util.PrecacheModel(“models/sickness/murcielago.sw.vtx”)
util.PrecacheModel(“models/sickness/murcielago.vvd”)

[/lua]

Players still download the files, but they still see errors.