Fast dl not working.

Yet again fastdl has broke.
/orangebox/garrysmod/lua/autorun/server/fastdl.lua is my server filepath


if (SERVER) then
resource.AddFile ("models/fluttershy_npc.mdl")
resource.AddFile ("models/fluttershy_player.mdl")
resource.AddFile ("models/player/fc_jack.mdl")
resource.AddFile ("materials/models/player/hero/Estuche.vmt")
resource.AddFile ("materials/models/player/hero/Estuche.vtf")
resource.AddFile ("materials/models/player/hero/hero_hair.vmt")
resource.AddFile ("materials/models/player/hero/hero_hair.vtf")
resource.AddFile ("materials/models/player/hero/hero_hair_nor.vtf")
resource.AddFile ("materials/models/player/hero/s_herobody2.vmt")
resource.AddFile ("materials/models/player/hero/s_herobody2.vtf")
resource.AddFile ("materials/models/player/hero/s_herobody2_nor.vtf")
resource.AddFile ("materials/models/player/hero/s_hero_tornsleev.vmt")
resource.AddFile ("materials/models/player/hero/s_hero_tornsleev.vtf")
resource.AddFile ("materials/models/player/hero/s_hero_tornsleev_nor.vtf")
resource.AddFile ("materials/models/player/hero/s_JC_head.vmt")
resource.AddFile ("materials/models/player/hero/s_JC_head.vtf")
resource.AddFile ("materials/models/player/hero/s_JC_head_nor.vtf")
resource.AddFile ("materials/models/player/hero/s_mscoutlegl.vmt")
resource.AddFile ("materials/models/player/hero/s_mscoutlegl.vtf")
resource.AddFile ("materials/models/player/hero/s_mscoutlegl_nor.vtf")
resource.AddFile ("models/player/danboard.mdl")
resource.AddFile ("materials/models/player/danboard_head_sheet.vtf")
resource.AddFile ("materials/models/player/danboard_head_sheet.vmt")
resource.AddFile ("materials/models/player/danboard_body_sheet.vtf")
resource.AddFile ("materials/models/player/danboard_body_sheet.vmt")
resource.AddFile ("materials/models/player/danboard_arm_leg_sheet.vtf")
resource.AddFile ("materials/models/player/danboard_arm_leg_sheet.vmt")
resource.AddFile( "materials/models/player/b4p/vader/alnewhope.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/alnewhope.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/beltxtras.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/beltxtras.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/darthshing.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/darthshing.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/dbreather.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/dbreather.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/dcape.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/dcape.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/handhope.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/handhope.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/headhope.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/headhope.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/helmethope.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/helmethope.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/hipsvader.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/hipsvader.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/legsvader.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/legsvader.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/shoulderhope.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/shoulderhope.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/torsovader.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/torsovader.vtf" )
resource.AddFile( "materials/models/player/b4p/vader/vaderface.vmt" )
resource.AddFile( "materials/models/player/b4p/vader/vaderface.vtf" )
resource.AddFile( "models/player/b4p/b4p_vader.mdl" )
end

This was working, until i synced it to the fastdl url…

I might get dumb-rated on this but I don’t think you need the if (SERVER) just have resource.AddFile

Ok i will try that.

[editline]8th February 2013[/editline]

Didnt work.

There’s still no need to do the if server check since you placed it in autorun/server

What exactly doesn’t work?
Do you get an error in console, or does it just not download?

Remove the () around it, it should look like this:

[LUA]
if Server then
resource.AddFile(“Things you want”)
end
[/LUA]

And for everyone that was wondering when you put “if server then” it is saying if its a server then do such n’ such command, so in turn it will always do that it will run anything below it.

Doesnt download

No. There’s no reason to make the serverside check when you place it in autorun/server as he did. And the surrounding () doesn’t make a difference.

Backup that one so you don’t have to retype.
Then remove everything inside.

And now add:
resource.AddSingleFile(“Blabla”)

Try put just a model in there and see if it downloads.

Yeah it does has he tried it yet and i think the server is in all caps my bad heres an example from one of the servers in coding for, this is for the gold deagle

[LUA]
if SERVER then
AddCSLuaFile( “shared.lua” )

resource.AddFile(“models/weapons/v_pist_geagle.dx80.vtx”)
resource.AddFile(“models/weapons/v_pist_geagle.dx90.vtx”)
resource.AddFile(“models/weapons/v_pist_geagle.mdl”)
resource.AddFile(“models/weapons/v_pist_geagle.sw.vtx”)
resource.AddFile(“models/weapons/v_pist_geagle.vvd”)
resource.AddFile(“models/weapons/w_pist_geagle.phy”)
resource.AddFile(“models/weapons/w_pist_geagle.dx80.vtx”)
resource.AddFile(“models/weapons/w_pist_geagle.dx90.vtx”)
resource.AddFile(“models/weapons/w_pist_geagle.mdl”)
resource.AddFile(“models/weapons/w_pist_geagle.sw.vtx”)
resource.AddFile(“models/weapons/w_pist_geagle.vvd”)

resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/bullet.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/bullet.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/Golden 2 toned norm.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/Golden 2 toned.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/grip.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/grip.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/grip_normal.vtf”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/main.vmt”)
resource.AddFile(“materials/models/weapons/w_models/Havoc Deagle/bullet.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/grip.vmt”)
resource.AddFile(“materials/models/weapons/v_models/Havoc Deagle/main.vmt”)
end
[/LUA]

Simple as that

Don’t be stupid. The check makes sure it’s only being ran serverside. When you put scripts in lua/autorun/server it’s only being ran serverside. If you put it in lua/autorun you can make the check…

Really I didn’t think it made a difference but you may be right
Has the owner of this thread this yet?

Nope. Doesnt download

I meant removing the () I just want to see if it works or not

No it doesnt.

ok

[editline]8th February 2013[/editline]

Actually why do you have the spaces between the resouce.AddFile and the (material/watever)
I think there shouldnt be a space in there

It works and downloads the model (But it still shows an error ingame) Until i add it to the fastdl URL, which makes it not an error, but no one now downloads it.

What’s your downloadurl being set to? If it doesn’t have “http://” in front, it might not work. That was the case with my fastdl problems?

Okey, good.
Now do as TryHardCoder did with adding all files but with resource.AddSingleFile("") and with you models or whatevet you want