ok. I have tried and tried, Search and Searched... I am getting this error
c1xx : fatal error C1083: Cannot open source file: '.\..scr\WarpNPC\WarpNPC.cpp': No such file or directory
Setup.cpp
c1xx : fatal error C1083: Cannot open source file: '.\..scr\WarpNPC\Setup.cpp': No such file or directory
Generating Code...
My Setup.ccp, Setup.h, and WarpNPC.cpp are saved at E:\AC Code\branches\3_8_stable\src\scripts\src\WarpNPC
Here is my Project File... Saved under E:\AC Code\branches\3_8_stable\src\scripts\projects
Code:
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="WarpNPC"
ProjectGUID="{495CDEBE-E216-485B-B2F1-2FC0BD9DAE7D}"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="......bindebugscript_bin"
IntermediateDirectory="2003_int_debug_WarpNPC"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults/UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="0"
AdditionalIncludeDirectories="....ascent-shared;....ascent-world;......depinclude;......depsrc"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SCRIPTLIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="ascent-world.lib"
OutputFile="../../../bin/debug/script_bin/WarpNPC.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="......bindebug"
GenerateDebugInformation="true"
ProgramDatabaseFile="../../../bin/debug/script_bin/WarpNPC.pdb"
SubSystem="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(OutDir)/WarpNPC.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMa****ol"
/>
<Tool
Name="VCBscMa****ol"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="......binreleasescript_bin"
IntermediateDirectory="2003_int_release_WarpNPC"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults/UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
ExcludedFromBuild="true"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="....ascent-shared;....ascent-world;......depinclude;......depsrc"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPTLIB"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="ascent-world.lib"
OutputFile="../../../bin/release/script_bin/WarpNPC.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="......binrelease"
GenerateDebugInformation="true"
ProgramDatabaseFile="../../../bin/release/script_bin/WarpNPC.pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary="$(OutDir)/WarpNPC.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMa****ol"
/>
<Tool
Name="VCBscMa****ol"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Main Resources"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..scrWarpNPCSetup.cpp"
>
</File>
<File
RelativePath="..scrWarpNPCSetup.h"
>
</File>
</Filter>
<Filter
Name="Scripts"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..scrWarpNPCWarpNPC.cpp"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
The code for setup.cpp
Code:
#include "StdAfx.h"
#include "Setup.h"
extern "C" SCRIPT_DECL uint32 _exp_get_version()
{
return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
}
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
SetupWarpnpc(mgr);
}
#ifdef WIN32
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
#endif
The code for Setup.h
Code:
#ifndef INSTANCE_SCRIPTS_SETUP_H
#define INSTANCE_SCRIPTS_SETUP_H
void SetupWarpNPC(ScriptMgr * mgr);
#endif
The code for WarpNPC.cpp (yes I know, just one port location, just trying to get something working)
Code:
#include "StdAfx.h"
#include "Setup.h"
#ifdef WIN32
#pragma warning(disable:4305)// warning C4305: 'argument' : truncation from 'double' to 'float'
#endif
class SCRIPT_DECL WarpNPC : public GossipScript
{
public:
void Destroy()
{
delete this;
}
void GossipHello(Object* pObject, Player * Plr, bool AutoSend)
{
GossipMenu *Menu;
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
Menu->AddItem(0,"Horde Cities", 1);
if(AutoSend)
Menu->SendTo(Plr);
}
void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
{
Creature * pCreature = (pObject->GetTypeId()==TYPEID_UNIT)?((Creature*)pObject):NULL;
if(pCreature==NULL)
return ;
GossipMenu *Menu;
switch(IntId)
{
case 1: //Horde Cities
{
objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
Menu->AddItem(5,"Orgrimmar",2);
Menu->SendTo(Plr);
}break;
case 2: //Orgrimmar
{
//Teleport the player.
Plr->EventTeleport( 1, 1502.71, -4415.42, 21.5512);
Plr->Gossip_Complete();
}break;
}
}
};
void SetupWarpnpc(ScriptMgr * mgr)
{
GossipScript *warp = (Warpnpc*) new WarpNPC();
mgr->register_gossip_script(100000, warp);
}