I’m not sure why using Player.GiveAmmo in a SWEP will result in an error. Am I doin’ it rite?
In function SWEP:Initialize():
[lua] if (SERVER) then
self.Owner:GiveAmmo(14, CombineCannon, true)
This results in the error (serverside, referring to the lines above):
attempt to call method ‘GiveAmmo’ (a nil value).
Note that doing something similar in a SENT with Player.GiveAmmo works fine.
Any help regarding this is appreciated, thanks!