Results 1 to 13 of 13

Threaded View

  1. #1
    cosconub's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    in the programming section MPGH Cash: $90,000,000,000
    Posts
    372
    Reputation
    -4
    Thanks
    39
    My Mood
    Psychedelic

    Why do i keep geting this error?

    Code:
    Error	1	error C2664: 'ID3DXFont::DrawTextW' : cannot convert parameter 2 from 'char [1024]' to 'LPCWSTR'	c:\users\chris\desktop\uptodatebase\my hacks\cabase\directx.cpp	27	1	CaBase
    &
    Code:
    	2	IntelliSense: argument of type "char *" is incompatible with parameter of type "LPCWSTR"	c:\users\chris\desktop\uptodatebase\my hacks\cabase\directx.cpp	27	26	CaBase
    this is what is causing it
    Code:
    void cDirectx::DrawString(int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...)
    {
    	RECT FontPos = { x, y, x + 120, y + 16 };
    	char buf[1024] = {'\0'};
    	va_list va_alist;
    
    	va_start(va_alist, fmt);
    	vsprintf_s(buf, fmt, va_alist);
    	va_end(va_alist);
    
    	g_pFont->DrawText(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
    }
    Last edited by cosconub; 08-19-2010 at 06:08 AM.

Similar Threads

  1. [Help Request] why do i keep getting this error?
    By guypeledftw in forum Combat Arms Help
    Replies: 1
    Last Post: 06-17-2011, 10:15 AM
  2. WHY DO I KEEP GETTING THIS?????????
    By megacool4000 in forum Combat Arms Coding Help & Discussion
    Replies: 24
    Last Post: 10-30-2010, 09:42 PM
  3. Why i keep getting this error?
    By muumimamma in forum Combat Arms EU Help
    Replies: 10
    Last Post: 07-03-2010, 10:19 PM
  4. I keep getting this error message
    By I-Rule in forum CrossFire Help
    Replies: 7
    Last Post: 06-29-2010, 12:43 AM
  5. help i keep getting this error
    By <sniper> in forum Hardware & Software Support
    Replies: 0
    Last Post: 10-29-2007, 05:13 PM