- Joined
- Apr 23, 2006
- Messages
- 415
- Reaction score
- 45
Hello guys, I'm coding a dll to attach to my Gunz Online Server. It is meant to change the gravity vaule:
But I'm getting a wired error:
The code looks to be ok, what can be wrong? Thanks!
Code:
//Headers
#include <windows.h>
#include <stdio.h>
#define UpdateGravityADDR 0x004861F0 //Function Pointer
//Call Pointer
typedef VOID (__cdecl *ZModule_Movable)(float*);
ZModule_Movable UpdateGravity = (ZModule_Movable)UpdateGravityADDR;
//Gravidade
if (GetAsyncKeyState(VK_HOME)&0x8000){
UpdateGravity(10.00); // W00t 10 de gravidade FTW
}
if (reason == DLL_PROCESS_ATTACH){
//Show a message that the DLL was injected!
MessageBox(NULL,"Oia, ateh parece q deu certo...","DLL Beta",MB_OK);
//Create different Threads to prevent target process from stopping!
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&MainLoop,NULL,0,NULL);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&MainCheck,NULL,0,NULL);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&Respawn,0,NULL,NULL);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&ShotSpam1,0,NULL,NULL);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&ShotSpam2,0,NULL,NULL);
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)&Questing,0,NULL,NULL);
}
But I'm getting a wired error:
Code:
12 C:\Dev-Cpp\main.cpp expected unqualified-id before "if"
The code looks to be ok, what can be wrong? Thanks!

