LUA Help

I was working on sweps and this happened, can anyone tell me what went wrong?

[test] lua/weapons/weapon_tommygun/shared.lua:591: ‘)’ expected near ‘|’

  1. unknown - lua/weapons/weapon_tommygun/shared.lua:0

[test] lua/weapons/weapon_tommygun/cl_init.lua:16: bad argument #2 to ‘Exists’ (string expected, got no value)

  1. Exists - [C]:-1
  2. unknown - lua/weapons/weapon_tommygun/cl_init.lua:16

[test] lua/weapons/weapon_tommygun_mob/shared.lua:591: ‘)’ expected near ‘|’

  1. unknown - lua/weapons/weapon_tommygun_mob/shared.lua:0

[test] lua/weapons/weapon_tommygun_mob/cl_init.lua:16: bad argument #2 to ‘Exists’ (string expected, got no value)

  1. Exists - [C]:-1
  2. unknown - lua/weapons/weapon_tommygun_mob/cl_init.lua:16

[test] lua/effects/effect_mad_ignition/init.lua:7: attempt to call method ‘SetMaterialInt’ (a nil value)

  1. unknown - lua/effects/effect_mad_ignition/init.lua:7

First error: use bit.bor
Second error: file.Exists( file, path )
Third error: use bit.bor
Fourth error: file.Exists( file, path )
Fifth error: IMaterial:SetInt

Explain to me in detail, I want to fix this problem but don’t understand what you are trying to say.

Instead of A | B | C, use bit.bor(a, b, c)

The second arg to file.Exists is where you want to search. For example, if you’re looking inside the data folder, use file.Exists( “myfile.txt”, “DATA” ). If the main garrysmod directory, file.Exists( “myfile.txt”, “GAME” ).

[Set/Get]Material* has just been changed to [Set/Get]*. So SetMaterialInt should be SetInt.

This is going off of memory, so I’m not 100% sure about these, but they should be correct. :v: