32 bit revenue overflow

Stop by here for help with RRT3 Editor problems and tips.
grashopa
Hobo
Posts: 37
Joined: Thu Dec 06, 2012 12:10 am

32 bit revenue overflow Unread post

For the Pennsylvania 1855 map I want to fix the LTD revenue overflow problem:

I tried to fix the LTD revenue overflow by saving the yearly revenues/10 in PV3 and using that for the medal test. So two always true yearly events:

end of year:
player variable 4 + [YTD revenue]

beg of year
player variable 4 / 10
player variable 3 + player variable 4
player variable 4 = 0

And the final test is against player variable 3 being > 100,000,000

However in beg of year variable 4 is always 0. Despite [YTD revenue] printing correct in the end of year message. Do the effects not occur in order?
User avatar
OilCan
Engineer
Posts: 832
Joined: Tue Jan 13, 2009 2:03 pm
Location: East Tennessee, USA

Re: 32 bit revenue overflow Unread post

Without seeing your actual event, my first question is whether the human player was selected for the condition and the effect in both events?
Second question is whether the player's company is selected for the effect of PV4 + YTD revenue?
Forgive if you already have this correctly set, but I have to start with the fundamentals. I have lost count of the number of times I've tripped up over the ownership of variables.

Yes, effects do occur in order. The sequence of effects for your beginning of year event should work.
grashopa
Hobo
Posts: 37
Joined: Thu Dec 06, 2012 12:10 am

Re: 32 bit revenue overflow Unread post

Great thanks, I'm sure it is what you mentioned. I'll fix it up when I get home.
Post Reply