Hello, Im trying to get my game to print the fps to the bottom right of the screen, and Ive been using this code to do so:
char fps1[150];
strcpy(fps1, "fps=");
strcat(fps1, dbStr(dbScreenFPS()));
dbText(dbScreenWidth ( ) - 20 - dbTextWidth(fps1),dbScreenHeight()-40,fps1);
it works fine, it displays the fps right where I want it but when I close the program it says:
Quote: "A buffer overrun has occurred in ld22.exe which has corrupted the program's internal state. Press Break to debug the program or Continue to terminate the program.
For more details please see Help topic 'How to debug Buffer Overrun Issues'."
can anyone tell me why this is happening?