#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
int X = 300;
int score = 0;
int lives = 3;
dbRGB (0,0,0);
dbColorBackdrop( dbRGB(0,0,0) );
dbLoadImage ("Ship.jpg",2);
dbLoadImage ("Block.jpg",3);
dbLoadImage ("Score.jpg",10);
dbLoadImage ("Lives.jpg",11);
dbText (510,3,lives);
dbSprite (10,3,3,10);
dbSprite (11,500,3,11);
dbSprite (3,50,330,3);
dbSprite (4,300,330,3);
dbSprite (5,550,330,3);
while ( LoopGDK ( ) )
{
dbSprite (2,X,400,2);
if (dbRightKey())
{
X = X+3;
}
if (dbLeftKey())
{
X = X-3;
}
if (dbSpaceKey())
{
dbShowSprite (6);
dbMoveSprite (6,3.0f);
}
dbSync ( );
}
return;
}
I am trying to use dbText to show on screen how many lives the player has left. When i try to show int lives using dbText (510,3,lives); it gives me:
1>c:\users\j\documents\visual studio 2008\projects\space noobs\space noobs\main.cpp(25) : error C2664: 'dbText' : cannot convert parameter 3 from 'int' to 'char *'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
Im pretty new to DarkGDK and c++ so help will be appreciated
Thanks
"Lifes like a box of chocolates, you never know which one you get" Forest Gump
Unless you read the leaflet, thats why hes so "different"