Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument =/= parameter error #8

Open
erDonko opened this issue Mar 29, 2020 · 9 comments
Open

Argument =/= parameter error #8

erDonko opened this issue Mar 29, 2020 · 9 comments

Comments

@erDonko
Copy link

erDonko commented Mar 29, 2020

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

@rcszephyr
Copy link

Set Release instead of Debug

@NMan1
Copy link
Owner

NMan1 commented Mar 30, 2020

Yes

@erDonko
Copy link
Author

erDonko commented Mar 30, 2020

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

@brokeaidev
Copy link

brokeaidev commented Apr 19, 2020

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"

@johnwicksballs
Copy link

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.

@brokeaidev
Copy link

brokeaidev commented Apr 23, 2020

@johnwicksballs
Copy link

Add my Discord supreme#2978

Added

@d-motzer
Copy link

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

@bigshowbp01
Copy link

image
How to Fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@erDonko @NMan1 @rcszephyr @d-motzer @bigshowbp01 @brokeaidev @johnwicksballs and others