Ok here it is
Error
Code:
1>------ Build started: Project: Mallcommand, Configuration: Release Win32 ------
1>Compiling...
1>Mallcommand.cpp
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : error C2065: 'ScriptMgr' : undeclared identifier
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : error C2065: 'mgr' : undeclared identifier
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : error C2182: 'SetupMallcommand' : illegal use of type 'void'
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>Setup.cpp
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : error C2065: 'ScriptMgr' : undeclared identifier
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : error C2065: 'mgr' : undeclared identifier
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : error C2182: 'SetupMallcommand' : illegal use of type 'void'
1>c:\users\billy\desktop\aetherwow-compile\trunk\src\scripts\src\mallcommand\Setup.h(6) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>Build log was saved at "file://c:\Users\Billy\Desktop\AetherWoW-compile\trunk\src\scripts\projects\2008_int_release_Mallcommand\BuildLog.htm"
1>Mallcommand - 8 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Mallcommand.cpp
Code:
#include "StdAfx.h" //always needed
#include "Setup.h"
static string malltele = "#mall";
void EventMallcommand(Player * Plr, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
if(Message == malltele)
{
Plr->EventTeleport(1, -11792.368164, -4742.708008, 3.411385);
}
}
void SetupMallcommand(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (void *) EventMallcommand);
}
Setup.cpp
Code:
#include "StdAfx.h"
#include "Setup.h"
#define SKIP_ALLOCATOR_SHARING 1
#include <ScriptSetup.h>
extern "C" SCRIPT_DECL uint32 _exp_get_script_type()
{
return SCRIPT_TYPE_MISC;
}
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
SetupMallcommand(mgr);
}
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
#endif
Setup.h
Code:
#include "StdAfx.h"
#ifndef Mallcommand_SETUP_H
#define Mallcommand_SETUP_H
void SetupMallcommand(ScriptMgr * mgr);
#endif