Class Error

Posts 1–7 of 7 · Page 1 of 1
Class Error
Hi,
So, The problem is I can use it freely like, i include the header (#include "MManagerLocal.h") and i can use the Me->GetPlayerBase(); and every function, but when i try to compile is giving errors, most of variables and offset names saying:
Code:
...already defined in main.obj
In my main.cpp i include the header too, but in Variable.h and Offsets.h i don't, but is giving me that "i'm trying to re-declare them (variables/offsets) again"
Searched for every error, re-wrote everything and nothing, maybe is something simple in front of my eyes that i can't see (dunno why), anyway thanks if anyone can help!

 
MManagerLocal.cpp
Code:
#include "MemoryManagerLocalPlayer.h"
#include <stdarg.h>
#include <ios>
#include <iostream>
#include <string>
#include <time.h>
#include <Windows.h>

MManagerLocalPlayer* Me = new MManagerLocalPlayer;

MManagerLocalPlayer::MManagerLocalPlayer() {};
MManagerLocalPlayer::~MManagerLocalPlayer() {};

//---------------------------------------------------------------------------------------------------
// READING MEMORY
//---------------------------------------------------------------------------------------------------

/* DWORD */
DWORD MManagerLocalPlayer::GetPlayerBase() {
	return mem.Read<DWORD>(modClient.dwBase + offLocalPlayer);
}
DWORD MManagerLocalPlayer::GetEngineBase() {
	return mem.Read<DWORD>(modEngine.dwBase + offEnginePointer);
}

/* BYTE */
BYTE MManagerLocalPlayer::GetFlag() {
	//FUNCTION
}

/* FLOAT */
float MManagerLocalPlayer::GetFlash() {
	//FUNCTION
}

/* BOOL */
bool MManagerLocalPlayer::GetScopped() {
	//FUNCTION
}

/* INT */
int MManagerLocalPlayer::GetShotsFired() {
	//FUNCTION
}
int MManagerLocalPlayer::InGame() {
	//FUNCTION
}
int MManagerLocalPlayer::GetTeam() {
	//FUNCTION
}
int MManagerLocalPlayer::GetCrosshairId() {
	//FUNCTION
}

/* VECTOR */
Vector MManagerLocalPlayer::GetVelocity() {
	//FUNCTION
}
Vector MManagerLocalPlayer::GetViewOrigin() {
	//FUNCTION
}
Vector MManagerLocalPlayer::GetPosition() {
	//FUNCTION
}
Vector MManagerLocalPlayer::GetPunch() {
	//FUNCTION
}
Vector MManagerLocalPlayer::GetAngles() {
	//FUNCTION
}
Vector MManagerLocalPlayer::GetEyesPos() {
	//FUNCTION
}
Vector MManagerLocalPlayer::NormalizeAngles(Vector angle) {
	//FUNCTION
}

//---------------------------------------------------------------------------------------------------
// WRITING MEMORY
//---------------------------------------------------------------------------------------------------

void MManagerLocalPlayer::Jump(BYTE fFlag) {
	//FUNCTION
}

void MManagerLocalPlayer::SetFlash(float value) {
	//FUNCTION
}

void MManagerLocalPlayer::SetAngles(Vector value) {
	//FUNCTION
}

void MManagerLocalPlayer::SetSensitive(float value) {
	//FUNCTION
}

void MManagerLocalPlayer::Click() {
	//FUNCTION
}


 
MManagerLocal.h
Code:
#ifndef MEMORYPLAYER_H
#define MEMORYPLAYER_H

#include "PMemory.h"
#include "Variables.h"
#include "Offsets.h"
#include <string>
#include <fstream>

class MManagerLocalPlayer {
public:
	MManagerLocalPlayer();

	~MManagerLocalPlayer();

	//---------------------------------------------------------------------------------------------------
	// READING MEMORY
	//---------------------------------------------------------------------------------------------------

	DWORD GetPlayerBase();

	DWORD GetEngineBase();

	/* BYTE */
	BYTE GetFlag();

	/* FLOAT */
	float GetFlash();

	/* BOOL */
	bool GetScopped();

	/* INT */
	int GetShotsFired();

	int InGame();

	int GetTeam();

	int GetCrosshairId();

	/* VECTOR */
	Vector GetVelocity();

	Vector GetViewOrigin();

	Vector GetPosition();

	Vector GetPunch();

	Vector GetAngles();

	Vector GetEyesPos();

	Vector NormalizeAngles(Vector angle);

	//---------------------------------------------------------------------------------------------------
	// WRITING MEMORY
	//---------------------------------------------------------------------------------------------------

	void Jump(BYTE fFlag);

	void SetFlash(float value);

	void SetAngles(Vector value);

	void SetSensitive(float value);

	void Click();
};

extern MManagerLocalPlayer* Me;
#endif
I had this error too, for a looong time.

Anyways, the 2 files you added here don't cause the error, could you either post the other files here aswell, or, if you don't want to post them here, add me on steam and send me the files then?
Are you including MemoryManagerLocalPlayer.h anywhere else?
Quote Originally Posted by Chris View Post
Are you including MemoryManagerLocalPlayer.h anywhere else?
Yes, at the other headers, like Bhop header,

Bhop - same style as others
Code:
#ifndef BUNNYHOP_H
#define BUNNYHOP_H

#include "MemoryManagerLocalPlayer.h"
#include "MemoryManagerEntity.h"
#include <iostream>
#include <Windows.h>

void Bhop() {
	while (true) {
		if (bHopToggle) {
			if (GetAsyncKeyState(32)) {
				BYTE fFlag = Me->GetFlag();
				Me->Jump(fFlag);
			}
		}
		Sleep(5);
	}
}
#endif
The other hack headers are pretty much the same

main.cpp
Code:
#include "IncludeConfig.h"

[STAThread]
void main() {
//I do not call the Me-> or Entity-> here
}
include.h
Code:
#ifndef CONFIG_H
#define CONFIG_H

/* IMPORT */
#include "TheLOGIN.h"
#include "TheGUI.h"
#include "Variables.h"
#include "PatternScan.h"
#include "CLogger.h"

#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
#include <ctime>
#include <cstdio>
#include <conio.h>
#include <FCNTL.H>
#include <io.h>
#include <string>
#include <sstream>
#include <random>
#include <stdint.h>

/* HACKS */
#include "TriggerBOT.h"
#include "SlowAIM.h"
#include "GlowESP.h"
#include "AimBOT.h"
#include "BunnyHOP.h"
#include "NoFlash.h"
#include "RCS.h"
#include "Radar.h"

/* INCLUDES */
#pragma comment (lib,"User32.lib")
#define caseStringify(x) case x: return std::string(#x)
#define CStringify(x) std::to_string(x).c_str()

using namespace std;
using namespace System;
using namespace System::Windows::Forms;
using namespace System::Threading;

//More Code
#endif
Quote Originally Posted by PhY'z View Post
main.cpp
Code:
#include "IncludeConfig.h"

[STAThread]
void main() {
//I do not call the Me-> or Entity-> here
}
IncludeConfig.h?
Quote Originally Posted by WasserEsser View Post
IncludeConfig.h?
Code:
#ifndef CONFIG_H
#define CONFIG_H

/* IMPORT */
#include "TheLOGIN.h"
#include "TheGUI.h"
#include "Variables.h"
#include "PatternScan.h"
#include "CLogger.h"

#include <iostream>
#include <Windows.h>
#include <TlHelp32.h>
#include <ctime>
#include <cstdio>
#include <conio.h>
#include <FCNTL.H>
#include <io.h>
#include <string>
#include <sstream>
#include <random>
#include <stdint.h>

/* HACKS */
#include "TriggerBOT.h"
#include "SlowAIM.h"
#include "GlowESP.h"
#include "AimBOT.h"
#include "BunnyHOP.h"
#include "NoFlash.h"
#include "RCS.h"
#include "Radar.h"

/* INCLUDES */
#pragma comment (lib,"User32.lib")
#define caseStringify(x) case x: return std::string(#x)
#define CStringify(x) std::to_string(x).c_str()

using namespace std;
using namespace System;
using namespace System::Windows::Forms;
using namespace System::Threading;

//More Code for writing to a .ini file
#endif
When i back home i let you T.V. if u want or something like that
This error is called because you didn't use include guards or you included a header twice somewhere
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us