function GiveaDeagle(sender, command, arguments)
if sender:Money_Get() >= 400 then sender:Give("weapon_interloper_deagle") sender:Money_Take( 400 ) return true else return false end
concommand.Add(“GiveMeAGun” , GiveaDeagle() )[/lua]
At line 40, it’s giving me this error "attempt to index local 'sender ’ ( a nil value) ". I’m trying to let players buy weapons and then have their money taken away but after 2 hours of just messing code around, i’m stuck on this. My brain is fried at the moment, can anyone please help me solve this?