It looks like you've been mixing up the "==" operator with the "=" operator in several of your if loops. Here are all the instances I see:

public void FinishCast() {
if (c.casting = false) {...