S
ShaunBartoo
Guest
Hi,
Please excuse me if I'm missing something obvious. I'm pretty new to GML and not an expert at programming in general.
I've noticed that my variables are automatically rounding to 2 decimal places for some reason. For example,
I get the following output:
Can someone clarify for me why my variables are automatically rounding?
Thank you for reading!
EDIT: Figured it out.The rounding issue was being caused by the conversion from real to string. I resolved this by changing the debug_message to
Please excuse me if I'm missing something obvious. I'm pretty new to GML and not an expert at programming in general.
I've noticed that my variables are automatically rounding to 2 decimal places for some reason. For example,
Code:
var test = 0.075;
show_debug_message("test: " + string(test));
Code:
test: 0.07
Thank you for reading!
EDIT: Figured it out.The rounding issue was being caused by the conversion from real to string. I resolved this by changing the debug_message to
Code:
show_debug_message("test: " + string_format(test, string_length(string(round(test))), 3));
Last edited by a moderator: