Help coding a plugin, error: The left-hand side of an assignment must be a variable, a property or an indexer.

Hey guys! Might you help me sort this out? Im trying to make a plugin heal a player and reload his weapon after he kills someone, I've trying to solve it by doing this:

        private void OnEntityDeath(BasePlayer player, HitInfo info)
        {
            var starter = info?.InitiatorPlayer;
            if (starter == null || player.userID.IsSteamId() == false || starter?.userID.IsSteamId() == false && !permission.UserHasPermission(player.UserIDString, AUTOHEALANDRELOAD))
            {return;
            }            
            starter.Heal(100f);
            var projectile = projectile as BasePlayer;            
            projectile.primaryMagazine.contents = projectile.primaryMagazine.capacity;
            projectile.SendNetworkUpdateImmediate(); 
            
        }

But i keep getting this error: Error while compiling: KillReward.cs(28,40): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer.

How could I fix it? Thank you for the help! 

EDIT: Grammar

You want to change:

var projectile = projectile as BasePlayer;​

To something like:

var projectile = info.Weapon as BaseProjectile;

Make sure to check that it's not null, in case the killer was using a spear, etc.

okey, thank you very much! :)