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

Plugin specific problems will be solved here.

Moderators: Scenario Moderators, Plugin Moderators

User avatar
chian177
Villager
Posts: 15
Joined: 30 Oct 2020, 04:39

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

#1

Post 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 :?:

User avatar
ian`
Supporter
Posts: 118
Joined: 04 Apr 2020, 17:36
Location: Indonesien
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

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

#2

Post 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.

User avatar
chian177
Villager
Posts: 15
Joined: 30 Oct 2020, 04:39

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

#3

Post 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

Post Reply Previous topicNext topic

Return to “Problems”