Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Earning money gets way faster than paying off the debt. This way, when you get more than 32,767 cash, the counter overflows and the amount of money becomes negative. You shouldn't use a short (16 bit variable) for the money, instead a long (32 bit) can help to avoid this problem.

added some lines so cash shouldn't overflow any more in either mode