What's new

Having a small issue when compiling

Status
Not open for further replies.
R

Rubbers

Senior Member
Messages
4,792
Reaction score
1,791
Error C2084 function 'void WAIT(DWORD)' already has a body

Code:
#pragma once
using namespace std;
#include "Grief.h"
char *model;
HANDLE mainFiber;
DWORD wakeAt;
void WAIT(DWORD ms)
{
#ifndef __DEBUG
    wakeAt = timeGetTime() + ms;
    SwitchToFiber(mainFiber);
#endif
}
 
D

DeleteMe1744

Enthusiast
Messages
67
Reaction score
25
It looks like a function name conflict.
There must be a Wait function with the same definition already existing, probably from WinAPI. Well that's what it sounds like.
Just try with another name.
 
M

Maza

Video Editor
Messages
292
Reaction score
256
Try deleting the body of that function in your main line of code and only have the body of that function up with your pre processors, Then just pop that function name where ever you want it to be called in the program. That should help.

I'm still new to coding myself but i'm 70% sure that's how you fix it because I went through the same thing when I was learning about calling functions.

Correct me please if i'm wrong S7 Pro WildeThing GoldBl4d3
 
R

Rubbers

Senior Member
Messages
4,792
Reaction score
1,791
Try deleting the body of that function in your main line of code and only have the body of that function up with your pre processors, Then just pop that function name where ever you want it to be called in the program. That should help.

I'm still new to coding myself but i'm 70% sure that's how you fix it because I went through the same thing when I was learning about calling functions.

Correct me please if i'm wrong S7 Pro WildeThing GoldBl4d3
Ya I got it fixed after all I didn't see people replied.
 
Status
Not open for further replies.
Top Bottom