This function returns a string where the "#" symbol has been converted into a new line. So a string formatted as:
"Hello#World"
Would be printed to the screen as:
Hello
World
IMPORTANT This function is provided for import compatibility between GameMaker and previous versions of the software and as such this function should not be used except when necessary to replicate obsolete functionality. Instead you should be using the Escape Characters to mark a new line. For more information on import compatibility see the Obsolete Functions page.
string_hash_to_newline(string);
Argument | Type | Description |
---|---|---|
string | String | The string to convert over multiple lines |
var str = string_hash_to_newline("Hello#World");
draw_text(32, 32, str);
The above code converts the string with the hash symbol into a string split over two lines then prints it to the screen.