GiveAmmo creating lua errors in multiplayer w/ bots?
4 replies, posted
Just what the title says. GiveAmmo is giving lua errors in mutliplayer with bots and im not sure why.
Even though it's giving the ammo, it still shows a lua error.
Here's the code:
[CODE]
ply:PrintMessage(HUD_PRINTTALK, "PSI Hypo used")
ply:GiveAmmo( 50, "psi_psychpoints", true )
ply:EmitSound("player/suit_sprint.wav")
self:TakeSecondaryAmmo(self.Secondary.TakeAmmo)
[/CODE]
ply is not defined and self is not defined
[QUOTE=gonzalolog;52255151]ply is not defined and self is not defined[/QUOTE]
they are defined. i just forgot to include it in my post, sorry.
changed self to wep.
[CODE]
local wep = self.Weapon
local ply = self.Owner
[/CODE]
Then you might be running this in client, take a look the realms that those functions exists
[QUOTE=gonzalolog;52255184]Then you might be running this in client, take a look the realms that those functions exists[/QUOTE]
can you not run this in client?
Sorry, you need to Log In to post a reply to this thread.