Some wierd script compile error menu

User Tag List

Results 1 to 13 of 13
  1. #1
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some wierd script compile error

    Well every time i'll try to compile a script, i'll get this error
    Code:
    1>Setup.obj : error LNK2019: unresolved external symbol "void __cdecl SetupPvpSystemHandler(class ScriptMgr *)" (?SetupPvpSystemHandler@@YAXPAVScriptMgr@@@Z) referenced in function __exp_script_register
    always come whit every script i try to install :S
    +Rep if it works

    Some wierd script compile error
  2. #2
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Post setup.h, setup.cpp, and the PvP system file.

  3. #3
    guitargod218's Avatar Banned
    Reputation
    61
    Join Date
    Apr 2008
    Posts
    192
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Right click your project when in VS2008 and click properties, then go to linker and then command line. Under additional options put
    /FORCE:MULTIPLE
    There you go.

  4. #4
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay here you go
    PvpSystemHandler.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    void onPvpKill(Player* plr, Player* victim)
    {
       int itemID;
       uint32 tokenItem = Config.MainConfig.GetInt("Moon", "PvPTokenID", &itemID);
    
    sLog.outColor(TGREEN,"n[MOON] (%u)%s killed (%u)%s", plr->getLevel(), plr->GetName(), victim->getLevel(), victim->GetName());
    
       if(plr->getLevel() >= 70 && victim->getLevel() >= 70 && plr->GetTeam() != victim->GetTeam())
       {
          if(Config.MainConfig.GetBoolDefault("Moon", "PvPKillAnnounce", false))
          {
             char message[200];
             sprintf(message, "%s has killed %s", plr->GetName(), victim->GetName());
             sWorld.SendWorldWideScreenText(message);
          }
    
          sLog.outColor(TGREEN,"n[MOON] Adding token to %s", plr->GetName());
          sLog.outColor(TNORMAL,"n");
          ItemPrototype *proto = ItemPrototypeStorage.LookupEntry(itemID);
          SlotResult slotresult;
          slotresult = plr->GetItemInterface()->FindFreeInventorySlot(proto);
    
          if(!slotresult.Result)
          {
             plr->GetItemInterface()->BuildInventoryChangeError(NULL, NULL, INV_ERR_INVENTORY_FULL);
          }
          else
          {
             Item *itm = objmgr.CreateItem(itemID, plr);
             itm->SetUInt32Value(ITEM_FIELD_STACK_COUNT, 1);
             plr->GetItemInterface()->SafeAddItem(itm,slotresult.ContainerSlot, slotresult.Slot);
             plr->SaveToDB(false);
          }
       }
       else
       {
          sLog.outColor(TGREEN,"n[MOON] Not adding token since they both are not level 70");
          sLog.outColor(TNORMAL,"n");
       }
    }
    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)	// Comment any script to disable it
    {
    	SetupPvpSystemHandler(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif
    and the Setup.h
    Code:
    #ifndef MISC_SCRIPTS_SETUP_H
    #define MISC_SCRIPTS_SETUP_H
    
    
    void SetupPvpSystemHandler(ScriptMgr * mgr);
    
    
    
    #endif
    that was all :P


    EDIT: guitargod if i do that i'll get the same error
    ;S
    Last edited by Brutal Pink Panther; 06-09-2008 at 02:47 PM.

  5. #5
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add this to the end of the cpp.


    void SetupPvpSystemHandler(ScriptMgr * mgr)
    {
    mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, onPvpkill);
    }

  6. #6
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks +Rep for u
    Last edited by Brutal Pink Panther; 06-09-2008 at 02:49 PM.

  7. #7
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oopps....Make it "onPvpKill". Like this

    void SetupPvpSystemHandler(ScriptMgr * mgr)
    {
    mgr->register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, onPvpKill);
    }

  8. #8
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ye i noticed xD thanks for help mate!

  9. #9
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can i ask you for one more error ? :|

  10. #10
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya lol (filler)

  11. #11
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    xD cool well i got so many scripts i wanna have in my script here's the error
    Code:
    3>Setup.obj : error LNK2019: unresolved external symbol "void __cdecl SetupMorper(class ScriptMgr *)" (?SetupMorper@@YAXPAVScriptMgr@@@Z) referenced in function __exp_script_register
    Morpher.cpp
    Code:
    #include "StdAfx.h"
    #include "Setup.h"
    
    #define MORPHER 123455
    
    class SCRIPT_DECL Morpher : public GossipScript
    {
    public:
    	void GossipHello(Object * pObject, Player* Plr, bool AutoSend);
    	void GossipSelectOption(Object * pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code);
    	void GossipEnd(Object * pObject, Player* Plr);
    	void Destroy()
    	{
    		delete this;
    	}
    };
    
    void Morpher::GossipHello(Object* pObject, Player * Plr, bool AutoSend)
    {
    	GossipMenu *Menu;
    	objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 2593, Plr);
    	Menu->AddItem(0, "Goblin", 1);
    	Menu->AddItem(0, "Felguard", 2);
    	Menu->AddItem(0, "Broken", 3);
    	Menu->AddItem(0, "Ogre", 4);
    	Menu->AddItem(0, "Pirate", 5);
    	Menu->AddItem(0, "Skeleton", 6);
    	Menu->AddItem(2, "Demorph", 7);
    	   Menu->SendTo(Plr);
    }
    
    //Defining Cases
    void Morpher::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
    	GossipMenu * Menu;
    	switch(IntId)
    	{
    		case 0:
    		{
    			GossipHello(pObject, Plr, true);
    		}break;
    
    		case 1: //Goblin
    		{
    			Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 7109);
    		}break;		
    
    		case 2: //FelGuard
    		{
    			Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 18287);
    		}break;
    
    		case 3: //Broken
    		{
    			Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 21105);
    		}break;
    
    		case 4: //Ogre
    		{
    			Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 1122);
    		}break;
    
    		case 5: //Pirate
    		{
    			Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 2347);
    		}break;
    
    		case 6: //Skeleton
    		{
    			Plr->SetUInt32Value(UNIT_FIELD_DISPLAYID, 17970);
    		}break;
    
    		case 7: //Demorphing :p
    		{
    			Plr->DeMorph();
    		}break;
    
    	}//switch
    	Plr->Emote(EMOTE_ONESHOT_CHEER);
    	Plr->Gossip_Complete();
    };
    
    void Morpher::GossipEnd(Object * pObject, Player* Plr)
    {
    	GossipScript::GossipEnd(pObject, Plr);
    }
    
    void SetupMorpher(ScriptMgr * mgr)
    {
    	GossipScript * gs = (GossipScript*) new Morpher();
    	mgr->register_item_gossip_script(MORPHER, gs);
    }
    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)	// Comment any script to disable it
    {
    	SetupMorper(mgr);
    }
    
    #ifdef WIN32
    
    BOOL APIENTRY DllMain( HANDLE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved )
    {
        return TRUE;
    }
    
    #endif
    and Setup.h
    Code:
    #ifndef MISC_SCRIPTS_SETUP_H
    #define MISC_SCRIPTS_SETUP_H
    
    
    void SetupMorper(ScriptMgr * mgr);
    
    
    
    #endif
    well i think its like the other one :P

  12. #12
    Clain's Avatar Banned
    Reputation
    179
    Join Date
    Jan 2008
    Posts
    1,396
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You spelled Morpher wrong.

    Change it in setup.cpp/setup.h to Morpher not Morper

  13. #13
    Brutal Pink Panther's Avatar Member
    Reputation
    9
    Join Date
    Mar 2008
    Posts
    115
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll try that when i got home

Similar Threads

  1. [HELP] Moon++ Scripts (Compile)
    By Performer in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 03-05-2008, 11:34 PM
  2. [Questions] Change Log Location and Compile Error
    By SectorSeven in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 01-08-2008, 11:19 PM
  3. [Request]Some lua scripts
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 12-28-2007, 11:59 PM
  4. I need some help with Compiling
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 12-28-2007, 03:14 AM
  5. [HELP] Ascent Compiling Error.
    By jokerjokes in forum World of Warcraft Emulator Servers
    Replies: 23
    Last Post: 12-10-2007, 12:53 AM
All times are GMT -5. The time now is 01:45 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search