There shouldn't be any problem with the code I posted, I imagine you have something like:
Code:
static int points=0;
function drawpoints(BITMAP screenbuffer)
{
char buffer[20];
sprintf(buffer,"%d",points);
textout_ex(screenbuffer,font,buffer,250,250,makecol(0,0,0),makecol(0,0,0));
}
Because you haven't posted any piece of code I'm assuming that you use doublebuffering for drawing it all, so don't draw the text directly to the 'screen' default bitmap.
A second thing, read the Allegro documentation, in the function call you posted you are using black text with black background... I think you won't see the points with that color combination.
If your program still crashes the problem should be from other part, not this one (I suppose).
Niara