Modern-Warfare-Warzone-Cheat icon indicating copy to clipboard operation
Modern-Warfare-Warzone-Cheat copied to clipboard

Argument =/= parameter error

Open erDonko opened this issue 4 years ago • 9 comments

On Entity.cpp i get the error "argument of type (CHAR*) is incompatible with parameter of type (const wchar_t *)" when trying to compile

This is the function that gets the error:

bool GetPid() { HANDLE handle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL); PROCESSENTRY32 entry; entry.dwSize = sizeof(PROCESSENTRY32); if (Process32First(handle, &entry)) { while (Process32Next(handle, &entry)) { if (!wcscmp(entry.szExeFile, L"ModernWarfare.exe")) { Utils::Log("Process ID: ", entry.th32ProcessID); CloseHandle(handle); hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, entry.th32ProcessID); } } } peb_addy = get_peb_index(hProcess); CloseHandle(hProcess);

return true; }

with "f (!wcscmp(entry.szExeFile, L"ModernWarfare.exe"))" causing the error.

I understand this is getting a number of the game process, but i dont understand the code well enough to fix it by myself. image

erDonko avatar Mar 29 '20 23:03 erDonko

Set Release instead of Debug

rcszephyr avatar Mar 30 '20 01:03 rcszephyr

Yes

NMan1 avatar Mar 30 '20 02:03 NMan1

No longer getting the threads error, but i got a fuckton of LNK2001 because its looking for global.obj that i cant be bothered to double check right now because there could be a million solutions to this, so since im apparently the first and only to get these problems i will just leave it at that

erDonko avatar Mar 30 '20 02:03 erDonko

I'm having the same exact error... It compiled correctly a couple of times and after rebooting pc and a couple hours time, I started to get the LNK2001 errors.. Anyone know what I should do to fix it?

Edit: I fixed this issue my messaging Nman. Here are his words exactly "Stay in release, add L switch to Unicode and remove/add extern to those functions. Thats all you have to do"

brokeaidev avatar Apr 19 '20 17:04 brokeaidev

I'm having the same exact error... It compiled correctly a couple of times and after rebooting pc and a couple hours time, I started to get the LNK2001 errors.. Anyone know what I should do to fix it?

Edit: I fixed this issue my messaging Nman. Here are his words exactly "Stay in release, add L switch to Unicode and remove/add extern to those functions. Thats all you have to do"

How can i contact you? I'm getting the same issue you fixed but I cant figure it out.

johnwicksballs avatar Apr 23 '20 22:04 johnwicksballs

brokeaidev avatar Apr 23 '20 22:04 brokeaidev

Add my Discord supreme#2978

Added

johnwicksballs avatar Apr 23 '20 22:04 johnwicksballs

Add my Discord supreme#2978

hey can you add me brother? i switched to UTF8 but don't understand what you mean by adding L. discord: toth#0367

d-motzer avatar May 16 '20 05:05 d-motzer

image How to Fix ?

bigshowbp01 avatar Jan 09 '21 07:01 bigshowbp01