When using this code and putting it in lua\autorun I receive this lua error
[code]
[ERROR] lua/autorun/scar20resources.lua:3: invalid escape sequence near '"materials'
1. unknown - lua/autorun/scar20resources.lua:0
[/code]
[code]
resource.AddFile("materials\models\weapons\v_models\go_scar\scope_normal.vtf")
resource.AddFile("materials\models\weapons\v_models\go_scar\scope_scar.vtf")
resource.AddFile("materials\models\weapons\v_models\go_scar\scope_scar.vmt")
resource.AddFile("materials\models\weapons\v_models\go_scar\snip_scar20.vmt")
resource.AddFile("materials\models\weapons\v_models\go_scar\snip_scar20.vtf")
resource.AddFile("materials\models\weapons\v_models\go_scar\snip_scar20_exponent.vtf")
resource.AddFile("models\weapons\v_snip_scar20.mdl")
resource.AddFile("models\weapons\w_snip_scar20.mdl")
resource.AddFile("sound\scar20_unsil-1.wav")
resource.AddFile("gamemodes\terrortown\content\materials\VGUI\ttt\scar-20.vmt")
resource.AddFile("gamemodes\terrortown\entities\weapons\weapon_ttt_scar20\shared.lua")
[/code]
I think you need to use the other slash for those: /
In strings, there are special character combos that start with \. For example, \n means for anything interpreting the string to start a new line. You must be accidentally using one of these combinations. As Ozy said, use / instead of \.
You can also use \\, but should generally just use / as stated.
[quote]lua\autorun[/quote]
Also, it should be in lua/autorun/server
Sorry, you need to Log In to post a reply to this thread.