What's with all the asterisks? Makes the code very unreadable. Use spaces for indentation and code blocks when posting code here to preserve formatting.
Could you also give a screenshot (copy and paste the text, not a bitmap) of the input you give and output you get?
In case 2, what is the value of mGoldRequired just before the if?