- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
How would one print out the names of units/handles that we have references too, e.g. suppose I want to print out the list of all the heroes in the game (and I already have handles/references on all these heroes). What would the internals of such a function look like (which natives? do I need to do any type casting to string? etc.)
edit: The previous developer of the map I'm doing actually made string arrays for all the names of items, heroes, etc, and then just called these to print the names. That seems a bit silly, surely there is a function that reads a unit/item/etc's name and returns it as a string?
How would one print out the names of units/handles that we have references too, e.g. suppose I want to print out the list of all the heroes in the game (and I already have handles/references on all these heroes). What would the internals of such a function look like (which natives? do I need to do any type casting to string? etc.)
JASS:
function printUnitName takes unit u returns nothing
...
endfunction
edit: The previous developer of the map I'm doing actually made string arrays for all the names of items, heroes, etc, and then just called these to print the names. That seems a bit silly, surely there is a function that reads a unit/item/etc's name and returns it as a string?
Last edited: