Page 1 of 1

[1.9.49p][windows] Tile.getBuildingName not work

Posted: 13 Nov 2020, 10:17
by chian177
Hi, i use Tile.setBuildingName(tileX, tileY, name) is available, and show the new name at building info dialog Gui
but when use Tile.getBuildingName(tileX, tileY) is always return a nil value
is a bug :?:

Re: [1.9.49p][windows] Tile.getBuildingName not work

Posted: 13 Nov 2020, 12:45
by ian`
yeah, it's still available. You only need to do something to get the tileX and tileY values. The simpliest things are you can use script:click(x,y,level) and attach the script into building draft. so the tileX and tileY values can be set when the user click the building.

Code: Select all    Reset

function script:click(x,y,level) Debug.toast(Tile.getBuildingName(x,y)) end
Lua editor
Run
anyways, you can ask about lua in Lua Chatbox post.

Re: [1.9.49p][windows] Tile.getBuildingName not work

Posted: 13 Nov 2020, 14:43
by chian177
ian` wrote:
13 Nov 2020, 12:45
yeah, it's still available. You only need to do something to get the tileX and tileY values. The simpliest things are you can use script:click(x,y,level) and attach the script into building draft. so the tileX and tileY values can be set when the user click the building.

Code: Select all    Reset

function script:click(x,y,level) Debug.toast(Tile.getBuildingName(x,y)) end
Lua editor
Run
anyways, you can ask about lua in Lua Chatbox post.
Thanks very much, I'll try again later