No cashflow

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

CplHenderson
level2
level2
Posts: 191
Joined: Wed May 22, 2013 8:02 pm
Location: Toronto, Canada

No cashflow

Postby CplHenderson » Fri Apr 04, 2014 12:52 am

Normally, I would just file a bug report and move on. However, in this instance, help fixing the issue would be very appreciated because otherwise my savegame is essentially broken.

I have a positive cashflow (+$7000) but no money comes in every hour. My balance is in the negatives, negative $1200.

It started out fine, but at some point, the money stopped. It took me a while to notice.

I'm fairly sure that researching bank loans is what did this, but I have no confirmation of that. Everything except land expansion is unlocked.

Anyone else seen this? Any fixes?
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: No cashflow

Postby xander » Fri Apr 04, 2014 5:36 am

Is it possible that you had an incident, which caused you to lose your days-with-no-incident bonus?

xander
Person012345
level2
level2
Posts: 132
Joined: Fri Mar 22, 2013 4:06 pm

Re: No cashflow

Postby Person012345 » Fri Apr 04, 2014 6:42 am

xander wrote:Is it possible that you had an incident, which caused you to lose your days-with-no-incident bonus?

xander

Would people stop saying this. A glance at the forum shows that this is quite a widely reported bug by now.

It seems it happens when your cash reserves go negative and your cash will flow again if you get it positive. Use a loan or something to achieve that.

Two previous threads I know of are here and here.
User avatar
Chris
Introversion Staff
Introversion Staff
Posts: 1172
Joined: Sat Nov 25, 2000 7:28 pm
Location: Cambridge, UK
Contact:

Re: No cashflow

Postby Chris » Sun Apr 06, 2014 9:31 pm

Confirmed bug, caused by the negative balance. Fixed in a20.

This code:
bool FinanceSystem::CanAfford( int cost )
{
return( cost == 0 || m_balance + cost >= 0 );
}


Should have been
bool FinanceSystem::CanAfford( int cost )
{
return( cost >= 0 || m_balance + cost >= 0 );
}
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: No cashflow

Postby xander » Sun Apr 06, 2014 9:34 pm

Oh, noes! Some of Prison Architect's source code has been leaked!

xander
RGeezy911
level5
level5
Posts: 1098
Joined: Fri Aug 09, 2013 7:21 pm

Re: No cashflow

Postby RGeezy911 » Sun Apr 06, 2014 9:39 pm

This is the earliest report I could locate, and I have linked it to this topic: http://bugs.introversion.co.uk/view.php?id=3716
Duplicate report: http://bugs.introversion.co.uk/view.php?id=3727

Thanks for the fix Chris.
User avatar
VoiD88
level5
level5
Posts: 1001
Joined: Thu Dec 08, 2005 9:24 am
Location: Soltau, Germany
Contact:

Re: No cashflow

Postby VoiD88 » Mon Apr 07, 2014 8:40 am

Chris wrote:Confirmed bug, caused by the negative balance. Fixed in a20.

This code:
bool FinanceSystem::CanAfford( int cost )
{
return( cost == 0 || m_balance + cost >= 0 );
}


Should have been
bool FinanceSystem::CanAfford( int cost )
{
return( cost >= 0 || m_balance + cost >= 0 );
}

I hate tiny errors like this when I'm writing code, they are so f***ing hard to find :evil: Nicely located Chris^^
User avatar
111none
level4
level4
Posts: 970
Joined: Fri Oct 19, 2012 3:32 am
Location: Wangjing, Beijing, Peoples Republic of China

Re: No cashflow

Postby 111none » Sat Apr 12, 2014 4:15 am

Chris wrote:Confirmed bug, caused by the negative balance. Fixed in a20.

This code:
bool FinanceSystem::CanAfford( int cost )
{
return( cost == 0 || m_balance + cost >= 0 );
}


Should have been
bool FinanceSystem::CanAfford( int cost )
{
return( cost >= 0 || m_balance + cost >= 0 );
}


Now Prison Architect will have ripoffs from EA :(
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: No cashflow

Postby xander » Sat Apr 12, 2014 4:22 am

111none wrote:Now Prison Architect will have ripoffs from EA :(

I hear that Zynga is planning on releasing their penal-system social tycoon game "Jail Designer" next Thursday.

xander

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 2 guests