ExclamationWhy am I getting this

Posts 1–9 of 9 · Page 1 of 1
Why am I getting this
The menu base ; http://www.mpgh.net/forum/207-combat...haxo-base.html
Well I got this D3D Menu off someone here on MPGH I messed around with it abit updated my directories because I kept getting that D3D error, Then I get this,
Code:
1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1>  Menu.cpp
1>  Test
1>  Font.cpp
1>  Test
1>c:\users\narbz\desktop\d3dbase\font.cpp(164): error C2440: 'initializing' : cannot convert from 'const char [2]' to 'TCHAR [2]'
1>          There is no context in which this conversion is possible
1>  Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
All I see there is this,
Code:
    TCHAR str[2] = /*_T*/("x");
*I commented out the _T because that gave me errors too :/

Any ideas?
Try commenting out that whole line
Quote Originally Posted by justiniscool6 View Post
Try commenting out that whole line
Failing to learn.

In the thread he mentioned he missed something.

In Includes.h add this.

Code:
#include "TCHAR.h"
After that, remove all the comments. It should work, did for me when I was looking at it.
Quote Originally Posted by Flengo View Post


Failing to learn.

In the thread he mentioned he missed something.

In Includes.h add this.

Code:
#include "TCHAR.h"
After that, remove all the comments. It should work, did for me when I was looking at it.
Thanks but after I do that, I get this.
Code:
c:\users\NUUB\desktop\ca_haxo_base\addresses.cpp(99): error C2664: 'GetModuleHandleA' : cannot convert parameter 1 from 'const wchar_t [11]' to 'LPCSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style case
Any idea? But I get a bunch of those ModuleHandle things.
Quote Originally Posted by iiNarbz View Post
Thanks but after I do that, I get this.
Code:
c:\users\NUUB\desktop\ca_haxo_base\addresses.cpp(99): error C2664: 'GetModuleHandleA' : cannot convert parameter 1 from 'const wchar_t [11]' to 'LPCSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style case
Any idea? But I get a bunch of those ModuleHandle things.
change from "GetModuleHandleA" to "GetModuleHandleW"

---------- Post added at 03:47 PM ---------- Previous post was at 03:46 PM ----------

Quote Originally Posted by iiNarbz View Post
Thanks but after I do that, I get this.
Code:
c:\users\NUUB\desktop\ca_haxo_base\addresses.cpp(99): error C2664: 'GetModuleHandleA' : cannot convert parameter 1 from 'const wchar_t [11]' to 'LPCSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style case
Any idea? But I get a bunch of those ModuleHandle things.
change from "GetModuleHandleA" to "GetModuleHandleW"
Quote Originally Posted by Sixx93 View Post
change from "GetModuleHandleA" to "GetModuleHandleW"

---------- Post added at 03:47 PM ---------- Previous post was at 03:46 PM ----------


change from "GetModuleHandleA" to "GetModuleHandleW"
Thanks! That worked perfectly.
Quote Originally Posted by iiNarbz View Post
Thanks! That worked perfectly.
no problem when u get error like that (cannot convert parameter 1 from 'const wchar_t [11]' to 'LPCSTR', etc...), always try with the overflow function.. from 'A' to 'W' and vice versa
you cant convert a char* to a TCHAR*

so i recommend u do this

TCHAR tstring = L "My String";

or u can try to make the strings in the base all one thing, to make life easier.
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us