PDA

View Full Version : Outputting a float with entity_list.messageclose?


jsr
11-27-2012, 06:37 PM
I'm debugging some code by dumping a number of variables into /say, float's don't display correctly.

entity_list.MessageClose(this, false, 200, MT_say, "someint is %d, somefloat is %d", someint, somefloat);//DEBUG


I've tried converting the float to an int in the output but it's not giving me the precision I need. Is there another parameter I should use instead of %d?

Derision
11-27-2012, 06:44 PM
%f

http://www.cplusplus.com/reference/cstdio/printf/

jsr
11-27-2012, 06:47 PM
Much appreciated :)