Alright, so i was following 3 guides and finally got the DLL compiling to come somewhere, but now, when ive been sitting looking for hours i get another error!
Here are my scripts.
Event.cpp
Code:
//---------------------
// Name: Event Teleporter v2
// Author: Spidey
//---------------------
#include "StdAfx.h"
#include "Setup.h"
//If set to true, will enable players to #event while in combat
static bool bypassCombat = false;
static string evon = "#eventon";
static string evoff = "#eventoff";
static string evplr = "#event";
//Default Values
static bool eon = false;
static uint32 emapid = 0;
static float ex = 0.0f;
static float ey = 0.0f;
static float ez = 0.0f;
void EventChat(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
if(Message == evon && pPlayer->GetSession()->HasGMPermissions())
{
eon = true;
ex = pPlayer->GetPositionX();
ey = pPlayer->GetPositionY();
ez = pPlayer->GetPositionZ();
emapid = pPlayer->GetMapId();
}
else if(Message == evoff && pPlayer->GetSession()->HasGMPermissions())
{
eon = false;
}
else if(Message == evplr)
{
if(eon)
if(bypassCombat || !pPlayer->CombatStatus.IsInCombat())
pPlayer->EventTeleport(emapid, ex, ey, ez);
else
pPlayer->BroadcastMessage("You can't port while in combat.");
else
pPlayer->BroadcastMessage("There's no active event at the moment.");
}
}
void SetupEvent(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, &EventChat);
}
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)
{
SetupEvent(mgr);
}
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
#endif
Setup.h
Code:
#ifndef INSTANCE_SCRIPTS_SETUP_H
#define INSTANCE_SCRIPTS_SETUP_H
void SetupEvent(ScriptMgr * mgr);
#endif
--------------------------------------------------------------------------
Here is the ERROR-code:
Code:
------ Build started: Project: Event, Configuration: Release Win32 ------
Compiling...
Setup.cpp
c:\Documents and Settings\Oscar\Skrivbord\test\trunk\src\arcemu-world\ScriptSetup.h(25) : fatal error C1083: Cannot open include file: 'svn_revision.h': No such file or directory
Build log was saved at "file://c:\Documents and Settings\Oscar\Skrivbord\test\trunk\src\scripts\projects\2008_int_release_Event\BuildLog.htm"
Event - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any help appriciated!