Allegro Problem

I am starting with allegro, and i am having a problem. This is the code for my application, (its just supposed to output "Hello word, I am a magical Allegro program") It doesnt show any errors, but all it does is display a blank screen.
this is the code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <allegro5\allegro.h>
#include <allegro5\allegro_native_dialog.h>
#include <allegro5\allegro_font.h>
#include <allegro5\allegro_ttf.h>


int main ()
{
	ALLEGRO_DISPLAY *display =NULL;

	if (!al_init())
	{
		al_show_native_message_box (NULL, NULL, NULL,
			"FAILED TO INITIALIZE ALLEGRO", NULL, NULL);
		
		return -1;
	}


	display = al_create_display (640, 480);

	if (!display)
	{
		al_show_native_message_box (NULL, NULL, NULL,
			"FAILED TO INITIALIZE display", NULL, NULL);
		
		return -1;
	}

	al_init_font_addon();
	al_init_ttf_addon();
	ALLEGRO_FONT *font24 = al_load_font ("arial.ttf", 24, 0);

	al_clear_to_color (al_map_rgb (0,0,0));

	al_draw_text (font24, al_map_rgb(255,0,255), 50, 50, 0, "Hello World, this is Allegro the magical game library!");

	al_flip_display;

	al_rest (3.0);
	
	al_destroy_display(display);
	return 0;
}



Thanks in advance for any help!
Please help
Make sure the font is loaded successfully.
Also, you forgot a pair of parentheses here -> al_flip_display;. It should be -> al_flip_display();.
Topic archived. No new replies allowed.