What is wrong with my code? My fps time is not working.I found two errors in my code.
Error 1 error C3861: 'install_timer_ex': identifier not found.
Error 2 error C3861: 'textmode': identifier not found.

#include <allegro.h>
BITMAP* buffer = create_bitmap(480,480);

 volatile int fps = 0;
 volatile int avg_fps = 0;
 volatile int last_fps = 0;
 
 void fps_timer(){
	last_fps=fps;
	fps=0;
	avg_fps=(avg_fps*last_fps)/2;
}
 
 int main(){
	allegro_init();
	install_timer();
	set_gfx_mode( GFX_AUTODETECT, 480, 480, 0, 0);

	install_timer_ex(fps_timer,SECS_TO_TIMER(1));

while(!key[KEY_ESC]){
	//drawing code//

	fps++;
	//textout fps, avgfps, lastfps, etc//
	textmode(makecol(0,0,0));
	textprintf(buffer,font,0,0,makecol(0,0,0),"FPS: %i  Average FPS: %i", last_fps, avg_fps);

}
 }

I have never used allegro, but my guess is:

- There is no function called install_timer_ex (maybe you mean install_int_ex?)
- There is no function called textmode (seems redundant)

This question has already been answered. Start a new discussion instead.