- Joined
- Feb 2, 2006
- Messages
- 1,630
Hi,
I would like to show unit gold and lumber costs in a tooltip in my custom UI for my paged buttons system.
However, with
it seems to crash the game when the ID belongs to a hero unit type 
Is this known behavior?
I have declared the two natives from common.ai in my trigger:
I have no crashes for unit types based on non-hero unit types.
Is there an alternative system to detect the cost like for items? I am thinking about something based on the Transmute ability. It could create a dummy unit, the unit I need the cost of and transmute it etc.
I would like to show unit gold and lumber costs in a tooltip in my custom UI for my paged buttons system.
However, with
JASS:
GetUnitGoldCost
Is this known behavior?
I have declared the two natives from common.ai in my trigger:
JASS:
native GetUnitGoldCost takes integer unitid returns integer
native GetUnitWoodCost takes integer unitid returns integer
I have no crashes for unit types based on non-hero unit types.
Is there an alternative system to detect the cost like for items? I am thinking about something based on the Transmute ability. It could create a dummy unit, the unit I need the cost of and transmute it etc.