I forgot to declare the extern nMaxStakeValue.