canal bug - easy money

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

canal bug - easy money

Post by Wolf01 »

i found this bug when i was building canals...

i have made an animated gif to put all the screenshots in one image
Attachments
canals-bug.gif
canals-bug.gif (79.04 KiB) Viewed 2059 times
Airtaxi Pilot
Engineer
Engineer
Posts: 74
Joined: 11 Jun 2004 09:56

Post by Airtaxi Pilot »

lol, i just tried that! easy money!
SHADOW-XIII
Tycoon
Tycoon
Posts: 14275
Joined: 09 Jan 2003 08:37

Post by SHADOW-XIII »

I tried that and it crashed the game
what are you looking at? it's a signature!
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

I don't exactly know how to fix this bug, but I have found the problem. The problem is that with a peninsula like that, the upper tiles of the lock overlap eachother. On a dry run everything goes well because there is nothing built, so execution is started.
Lock 1 is built. When in DC_EXEC Lock2 is trying to build, it obviously cannot, and returns CMD_ERROR. CMD_ERROR is not caught in DC_EXEC (only with assert), and thus if you ignore it, you get the amoun of money that is CMD_ERROR.

The solution would be to first build lock1, and only after it is built checking lock2, and if possible building it. So not checking both in advance.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 0 guests