I've said it doesn't give infinite nades, and there's another error:
Code:
public grenade_throw(id,_,_) -> public grenade_throw(id, greindex, wpid)
And you have to remove the declaration of wpid and use the parameter.
Anyway, all compile errors are fixed on my first post, but your logic is all wrong.