1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\directx.cpp(25): error C2664: 'ID3DXFont:rawTextW' : cannot convert parameter 2 from 'LPCSTR' to 'LPCWSTR'
Don't use DrawTextW, just use DrawText, or DrawTextA (if they exist)
I just got a copy of Gellin's Updated Base from UC and I am using Visual Studio 2010 and I noticed it's an older script cuz I had to convert it to be able to work on Visual Studio 2010. Either something happened during that conversion process or IDK what, but it's throwing errors when I am trying to build the base, just to see it stock, so I can start tweaking with it and see how things are done so I can learn different coding styles and how things are done. I will post the error log:
Can someone give me some advice on what's going on here, and how to fix this problem so I know what to do in the future when I decide to start making my own base?Code:1>------ Build started: Project: Seal-Pub, Configuration: Debug Win32 ------ 1>Build started 8/28/2010 2:06:46 AM. 1>InitializeBuildStatus: 1> Touching "Debug\Seal-Pub.unsuccessfulbuild". 1>ClCompile: 1> Misc.cpp 1> Menu.cpp 1> DirectX.cpp 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\directx.cpp(25): error C2664: 'ID3DXFont::DrawTextW' : cannot convert parameter 2 from 'LPCSTR' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1> Generating Code... 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:03.23 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\directx.cpp(25): error C2664: 'ID3DXFont:rawTextW' : cannot convert parameter 2 from 'LPCSTR' to 'LPCWSTR'
Don't use DrawTextW, just use DrawText, or DrawTextA (if they exist)
also you said its Gellins. why does it say this
Build started: Project: Seal-Pub, Configuration: Debug Win32
Here's a clipping of the code of the portion that throws the error in directx.cpp:
Code:15 void cDirectx::DrawString(int x, int y, DWORD color, LPD3DXFONT g_pFont, const char *fmt, ...) 16 { 17 RECT FontPos = { x, y, x + 120, y + 16 }; 18 char buf[1024] = {'\0'}; 19 va_list va_alist; 20 21 va_start(va_alist, fmt); 22 vsprintf_s(buf, fmt, va_alist); 23 va_end(va_alist); 24 25 g_pFont->DrawText(NULL, (LPCSTR)buf, -1, &FontPos, DT_NOCLIP, color); 26 }IDK that's how I got it, you want me to link where I got it from??also you said its Gellins. why does it say this
Build started: Project: Seal-Pub, Configuration: Debug Win32
Also, the name of the file is CaBase
Last edited by DBag4Life69; 08-27-2010 at 05:25 PM.
COPY AND PASTER!
SENCE UR SO GOOD AT COPY AND PASTING HERE USE THIS
NOW TO BUSINESS
DO THIS
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->DrawTextA(NULL, buf, -1, &FontPos, DT_NOCLIP, color); }
THANK ME.. I HAD TO FIX UR MAJOR PROBLEM..
and i added a LETTER! lol
really thank me r i will rage u
I just like programming, that is all.
Current Stuff:
- GPU Programmer (Cuda)
- Client/Server (Cloud Server)
- Mobile App Development
DBag4Life69 (08-27-2010)
DBag4Life69 (08-27-2010)
DBag4Life69 (08-27-2010)
Dude... I'll also give you REP+.
But naww, it's not like I am just gonna sit here and C+P someone else's shit and release it. I am using this base as a reference to LEARN TO MAKE MY OWN. lol
You can obviously read that on the FIRST POST. lol
Here, I will make it easier for you so you don't have to scroll up...
and......so I can start tweaking with it and see how things are done so I can learn different coding styles and how things are done.
...so I know what to do in the future when I decide to start making my own base?
Hahah... BTW, I am not planning to release ANY hack ANYTIME soon, until I fully learn how to make a base for my SELF and make my own menu and everything. I want to have my OWN styles and everything cuz I don't like to use other people's work. I wanna make something that only I did, and that is unique from everyone else's. So once it happens, I hope everyone enjoys my unique releases.
BTW, I have MORE errors... after fixing that. :-|
Code:1>------ Build started: Project: Seal-Pub, Configuration: Debug Win32 ------ 1>Build started 8/28/2010 2:42:30 AM. 1>InitializeBuildStatus: 1> Touching "Debug\Seal-Pub.unsuccessfulbuild". 1>ClCompile: 1> DirectX.cpp 1> Base.cpp 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(37): error C2664: 'D3DXCreateFontW' : cannot convert parameter 11 from 'LPCSTR' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(217): error C2065: 'gr' : undeclared identifier 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(218): error C2065: 'bl' : undeclared identifier 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(239): error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'LPCSTR' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(240): error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'LPCSTR' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(241): error C2664: 'GetModuleHandleW' : cannot convert parameter 1 from 'LPCSTR' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:03.13 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Last edited by DBag4Life69; 08-27-2010 at 05:43 PM. Reason: MORE ERRORS!
Last edited by topblast; 08-27-2010 at 05:47 PM.
I just like programming, that is all.
Current Stuff:
- GPU Programmer (Cuda)
- Client/Server (Cloud Server)
- Mobile App Development
DBag4Life69 (08-27-2010)
Can you explain to me what the A does for the code to fix it?
BTW, that fixed all but this:
Code:1>------ Build started: Project: Seal-Pub, Configuration: Debug Win32 ------ 1>Build started 8/28/2010 2:47:12 AM. 1>InitializeBuildStatus: 1> Touching "Debug\Seal-Pub.unsuccessfulbuild". 1>ClCompile: 1> All outputs are up-to-date. 1> Base.cpp 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(217): error C2065: 'gr' : undeclared identifier 1>c:\users\david\downloads\combat arms hacks\cabase (1)\cabase\cabase\base.cpp(218): error C2065: 'bl' : undeclared identifier 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:01.29 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Code snippet:
Code:if(Menu2.mOpt[7].nopt>0){ char rd[3], gr[3], bl[3]; sprintf(rd, "FogR %d" , Menu2.mOpt[8].nopt); sprintf(gr, "FogG %d" , Menu2.mOpt[9].nopt); sprintf(bl, "FogB %d" , Menu2.mOpt[10].nopt); this->PushToConsole((const char *)rd); this->PushToConsole((const char *)gr); this->PushToConsole((const char *)bl); }else{ this->PushToConsole("FogR 255"); this->PushToConsole((const char *)gr); this->PushToConsole((const char *)bl);
The lines it is referring to is:
Code:}else{ this->PushToConsole("FogR 255"); this->PushToConsole((const char *)gr); //This line and... this->PushToConsole((const char *)bl); //This line.
Last edited by DBag4Life69; 08-27-2010 at 05:52 PM.
Just change your damn solution encoding from ASCII/standard to Unicode. It'll fix all your problems.
In coding a simple CAP LETTER can be the difference between a error and a GOOD TO GO(depends on the language)
The Function will be a different name
but the way it is done is
#ifdef unicode
#define function functionA
#else
#define function functionW
so it is making function = to one of those
if u dont understand now u will later
lol be nice
I just like programming, that is all.
Current Stuff:
- GPU Programmer (Cuda)
- Client/Server (Cloud Server)
- Mobile App Development
DBag4Life69 (08-27-2010)
Last edited by topblast; 08-27-2010 at 06:02 PM.
I just like programming, that is all.
Current Stuff:
- GPU Programmer (Cuda)
- Client/Server (Cloud Server)
- Mobile App Development
DBag4Life69 (08-27-2010)
kk. It's gonna be like 2 mins. I have to DL it again real quick.
EDIT: THANK YOU topblast. I will of course give you credz on any of my future releases when I get to that point. I appreciate your help.
EDIT2: The next problem is that now when I inject the dll into CA it D/C how do I make it "updated" so it doesn't D/C anymore?
Last edited by DBag4Life69; 08-27-2010 at 06:28 PM. Reason: Thanks.