G
Green Panda Studios
Guest
Hi everybody. I'm stumped on this one. I've been messing around with it for about an hour now, and I just can't figure out what this character is that keeps appearing at the end of a line after converting a txt file of dialogue to a string to use inside the game.
I wrote this function to return an included txt file as a string:
There are no errors and the game doesn't crash, or anything, but I get this weird box character wherever there is a new line in the original txt file.
If the original file looks like this:
The returned string would output like this:
I've tried using
with all sorts of variations for any Unicode character that vaguely looks like an empty rectangle, but it doesn't get rid of it.
Any help with this would be amazing, thanks.
I wrote this function to return an included txt file as a string:
Code:
///@desc this converts a file to string
///@argument0 filename
var i, file, str;
str=""
i = 0;
file = file_text_open_read(working_directory + argument0);
while (!file_text_eof(file))
{
str+= file_text_readln(file);
}
file_text_close(file);
return str;
If the original file looks like this:
Code:
This is the original file!
This is another line on the file!
Code:
This is the original file!▯
▯
This is another line on the file!
Code:
str = string_replace(str,"▯","");
Any help with this would be amazing, thanks.