That's because FireModes isn't initialized anywhere.
How would I fix it?
In SWEP:Initialize(), before you insert stuff into the table, put
[code]if not self.FireModes then self.FireModes = {} end[/code]
Now getting this error:
[code]
[ERROR] addons/fas/lua/weapons/fas2_base/shared.lua:174: attempt to perform arithmetic on field 'CaseLength' (a nil value)
1. CalculateEffectiveRange - addons/fas/lua/weapons/fas2_base/shared.lua:174
2. unknown - addons/fas/lua/weapons/fas2_base/shared.lua:203
[/code]
That's also undefined, but I can't tell what it's for. I doubt all of this stuff would be left undefined; are you missing some other base file or variable setup?
I got it straight from the workshop, so I don't think so.
[editline]6th September 2014[/editline]
I checked and everything is there.
Sorry, you need to Log In to post a reply to this thread.