I have done a hack in Visual C++, but I have a problem. When I try to debug it this happens: [PHP]------ Build started: Project: Hack, Configuration: Debug Win32 ------
Hack.cpp
Hack.cpp(10): error C2143: syntax error : missing ';' before '*'
Hack.cpp(10): error C2065: 'ient' : undeclared identifier
Hack.cpp(11): error C2065: 'ient' : undeclared identifier
Hack.cpp(42): error C2065: 'boxes' : undeclared identifier
Hack.cpp(45): error C2065: 'boxes' : undeclared identifier
Hack.cpp(49): error C2065: 'boxes' : undeclared identifier
Hack.cpp(53): error C2065: 'VK_NUMPAD' : undeclared identifier
Hack.cpp(53): error C2143: syntax error : missing ')' before 'constant'
Hack.cpp(53): error C2059: syntax error : ')'
Hack.cpp(53): error C2143: syntax error : missing ';' before '{'
Hack.cpp(54): error C2065: 'spread' : undeclared identifier
Hack.cpp(59): error C2065: 'spread' : undeclared identifier
Hack.cpp(65): error C2065: 'spread' : undeclared identifier
Hack.cpp(68): fatal error C1075: end of file found before the left brace '{' at 'Hack.cpp(39)' was matched
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/PHP]
Can somebody help me?
The source code what gets that error: [PHP]// Hack.cpp : main project file.
#include "stdafx.h"
#include <windows.h>
#include <shellapi.h>
#pragma comment(lib,"shell32.lib")
void __cdecl PushToConsole( const char* szCommand )
{
DWORD L***ient = ( DWORD* )( 0x3776FCC8 );
void* CONoff = ( void* )*( DWORD* )( L***ient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void MemCopy(void* Dest, const void* Src, int Len)
{
DWORD OldProtect;
DWORD OldProtect2;
VirtualProtect(Dest, Len, PAGE_EXECUTE_READWRITE, &OldProtect);
memcpy(Dest, Src, Len);
VirtualProtect(Dest, Len, OldProtect, &OldProtect2);
FlushInstructionCache(GetCurrentProcess(), Dest, Len);
}
void main()
{
if(GetAsyncKeyState(VK_NUMPAD1)<0){
if(boxes){
PushToConsole("ModelDebug_DrawBoxes 0");
PushToConsole("SkelModelStencil 0");
boxes = false;
} else {
PushToConsole("ModelDebug_DrawBoxes 1");
PushToConsole("SkelModelStencil 1");
boxes = true;
}
}
if(GetAsyncKeyState(VK_NUMPAD 2)<0){
if(spread){
PushToConsole("PerturbRotationEffect 3.000000");
PushToConsole("PerturbIncreaseSpeed 3.000000");
PushToConsole("PerturbDecreaseSpeed 9.000000");
PushToConsole("PerturbWalkPercent 0.500000");
spread = false;
} else {
PushToConsole("PerturbRotationEffect 0.000000");
PushToConsole("PerturbIncreaseSpeed 0.000000");
PushToConsole("PerturbWalkPercent 0.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
spread = true;
}
} [/PHP]