Your code is still prone to errors! This line right here, accesses the char pointer and assigns it to name:
Code:
box[i].name = _chr(read);



Once you remove the STRING via str_remove(), the pointer becomes invalid because it's handled by the owning STRING.

Quote:
I just don't understand why var worked but not for int, because afaik, var is just an extended type of int.

var is a fixed pointer number, while int is a boring integer. I was pretty sure that the file_open() methods would return integer handles, but if the automatic type promotion didn't work, then that's apparently not the case.


His words are wise, his face is beard.