Lock/water string errors
Posted: 02 Aug 2013 14:19
Is the lock tool supposed to be like that as I get the error Object in the way. When I drag it. I may have a look at it myself to try and disable it if t is not mean't to be dragable.
The place to talk about Transport Tycoon
https://www.tt-forums.net/
8roboboy wrote:What about over say 4+ tiles.
both.Are you trying in the game or scenario editor?
You could use an existing one in the General Strings section :roboboy wrote:Is there a standard string we can use or do we want to define a new one?
Code: Select all
0x0239 "\94...site unsuitable"
There is already an error handler. Look in water.asm, lines 1498/99. It just uses the wrong text id 0x5800, which is 'Object in the way' instead of something more appropriate.roboboy wrote:So far from what I can tell, it looks harder (for me) than I thought to fix as I think I will have to write an error handler for lock building.
Code: Select all
00B5 \94Can't clear this area....
Code: Select all
grep 00B5 *.asm
Normally, when constructing anything, clearing of the land happens first, followed by the construction of the 'object'. Most probably, you did not have enough money to clear the land first. If you did, then, should you not have enough further funds to construct the lock, you get the correct message. I don't think it is a serious bug, not enough funds is indicated either way.roboboy wrote:I found another bug. When I attempt to build a lock with out enough money, the error popup says Can't clear land rather than can't build lock. It only happens if I try to build the lock on a the slope in between two flat tiles. Do we consider that a bug?
OpenTTD has seperate tools for canals and locks, whereas TTDPatch uses the same tool. You cannot really compare the two here.OpenTTD deals with the error of building a lock on flat or double slopped land with the error "Land sloped in wrong direction" and only allows for a lock to be built by clicking on a valid slope.
Clearing the area, before building the 'shiplift' !! happens in procedure cleararea in enhgui,asm line 1659 and there is your error too, in case something happened that prevented the clearing. This is a global procedure, most probably used by many construction events. I wouldn't touch it.... 'Can't clear this area ...
I wouldn't touch enhgui.asm either. If I cleared the three tiles for my lock first, the price didn't go down, but I am happy to leave it at that and just supply the patch to change the error when you have the money available.OzTrans wrote:Normally, when constructing anything, clearing of the land happens first, followed by the construction of the 'object'. Most probably, you did not have enough money to clear the land first. If you did, then, should you not have enough further funds to construct the lock, you get the correct message. I don't think it is a serious bug, not enough funds is indicated either way.roboboy wrote:I found another bug. When I attempt to build a lock with out enough money, the error popup says Can't clear land rather than can't build lock. It only happens if I try to build the lock on a the slope in between two flat tiles. Do we consider that a bug?
OpenTTD has seperate tools for canals and locks, whereas TTDPatch uses the same tool. You cannot really compare the two here.OpenTTD deals with the error of building a lock on flat or double slopped land with the error "Land sloped in wrong direction" and only allows for a lock to be built by clicking on a valid slope.
Clearing the area, before building the 'shiplift' !! happens in procedure cleararea in enhgui,asm line 1659 and there is your error too, in case something happened that prevented the clearing. This is a global procedure, most probably used by many construction events. I wouldn't touch it.... 'Can't clear this area ...