Huh...Do you recall what you bought from them to have the gold go negative? I'm looking at the code and the code SHOULD be checking "Hey is your gold equal or greater than the cost?" before it lets you purchase that thing, and it minuses that same cost variable that it checks from your gold, so it shouldn't be able to go negative but clearly something's going wrong and I can't figure out what it would be.