EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Outputting a float with entity_list.messageclose? (https://www.eqemulator.org/forums/showthread.php?t=36046)

jsr 11-27-2012 06:37 PM

Outputting a float with entity_list.messageclose?
 
I'm debugging some code by dumping a number of variables into /say, float's don't display correctly.
Code:

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 :)


All times are GMT -4. The time now is 12:17 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.