Hey guys,
I'm having issues using the literal text "%". Say I want to type a creature's health in percent, ie "100%". Shouldnt using the escape sequence "%%" create a literal percentage sign?
Here's my code:
sprintf_s( strHealth, sizeof(strHealth), "%d %%", CreatureHealth);
I get a pop-up box runtime error saying
Debug Assertion Failed!
Program: c:\Users\Matt\Desktop\Game\Debug\Game.exe
File: f:\dd\vctools\crt_bld\self_x86\crt\src\output.c
Line: 2293
Expression: ((state == ST_NORMAL) || (state == ST_TYPE))
I get assertion errors for a lot of (usually trivial) things and so finding data relevant to this specific instance has proved a tad challenging for me, especially as google/gamedev searches ignore percentage signs!
Any help is greatly appreciated!