Invalid Escape Sequence?

Hello!

I was wondering if someone could tell me why i get this error


lua/autorun/spikes_load.lua:3: invalid escape sequence near '"resource'
  1. unknown - addons/tomz_spike_strp/lua/autorun/spikes_load.lua:0

This is the code in the autorun.


if SERVER then

	resource.AddFile("resource\materials\metalpipe007a.vmt")
	resource.AddFile("resource\models\road_spike.mdl")

end

some reason the r on models\road_spike.mdl shows up purple as you can see here.

Any help is appreciated :stuck_out_tongue:

Thanks,

Have a good day!

Use forward slashes or 2 backward slashes.

use / instead of
e.x.


resource.AddFile("resource/models/road_spike.mdl")

idk if \ works even if you escape it so i wouldn’t try it, just use /

[editline]20th December 2016[/editline]

ninja’d