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

Plugin specific problems will be solved here.

Moderator: Plugin Moderators

chian177
Villager
Reactions:
Posts: 15
Joined: Fri Oct 30, 2020 4: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`
Townsman
Reactions:
Posts: 81
Joined: Sat Apr 04, 2020 17:36
Location: Indonesien
Plugins: Show
Version: Beta

Platform

Plugin Creator

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
Interactive Lua editor
Run
anyways, you can ask about lua in Lua Chatbox post.
:fire

chian177
Villager
Reactions:
Posts: 15
Joined: Fri Oct 30, 2020 4:39

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

#3

Post by chian177 »

ian` wrote:
Fri Nov 13, 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
Interactive 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”