[Help] What I did wrong? menu

Shout-Out

User Tag List

Results 1 to 7 of 7
  1. #1
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Help] What I did wrong?

    So I copied the Guard's Code and modified it so it looks like this:

    Code:
    #include "StdAfx.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)        // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    /************************************************************************/
    /* GENERAL GUARD SCRIPT                                                 */
    /************************************************************************/
    
    // Covers *all* guard types, scripting their texts to guide players around.
    // Enable this define to make all gossip texts have a "back" / "I was looking
    // for somethinge else" button added.
    
    #define BACK_BUTTON
    
    #ifdef BACK_BUTTON
    
    // Make code neater with this define.
    #define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); \
        Menu->SendTo(Plr);
    
    #else
    
    // Make code neater with this define.
    #define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); \
        Menu->AddItem(0, "I wanna do something else.", 0); \
        Menu->SendTo(Plr);
    
    #endif
    
    /************************************************************************/
    /* WoWNezz Functions NPC                                                */
    /************************************************************************/
    
    class SCRIPT_DECL StormwindGuard : 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, "Player Tools", 1);
            Menu->AddItem(0, "Server Tools", 2);
            Menu->AddItem(0, "Morphs Menu", 3);
            Menu->AddItem(0, "Support", 4);
            Menu->AddItem(0, "Vote for us at WoWNezzRealms.tk!", 5);   
    
            if(AutoSend)
                Menu->SendTo(Plr);
        }
    
        void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        {
            GossipMenu * Menu;
            switch(IntId)
            {
            case 0:     // Return to start
                GossipHello(pObject, Plr, true);
                break;
    
    
                // Player Tools Menu
    
            case 1:   //Player Tools menu
    
                {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
                    Menu->AddItem( 0, "Force Rename Character", 10);
                    Menu->AddItem( 0, "Suicide!"     , 11);
                    Menu->SendTo(Plr);
                }break;
    
            case 2:   //Server Tools menu
    
                {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
                    Menu->AddItem( 0, "Server Stats", 20);
                    Menu->AddItem( 0, "Show Message of the Day"     , 21);
                    Menu->SendTo(Plr);
                }break;
    
            case 3:   //Morphs menu!
            
    {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);        
                    Menu->AddItem(0, "Criter Morph", 30)
                    Menu->AddItem(0, "Animals Morph", 31)
                    Menu->AddItem(0, "Elemental Morph", 32)
                    Menu->AddItem(0, "Humanoid Morph", 33)
                    Menu->AddItem(0, "Boss Morphs", 34)
                    Menu->AddItem(0, "Other Morphs", 35)
    }
    
    
    
    void SetupGuardGossip(ScriptMgr * mgr)
    {
        GossipScript * sw = (GossipScript*) new StormwindGuard();
            
        mgr->register_gossip_script(68,    sw); 
    
    }
    Didn't finished it yet.. Uhm the error is :

    Code:
    .\FunctionNPC.cpp(109) : fatal error C1075: end of file found before the left brace '{' at '.\FunctionNPC.cpp(62)' was matched
    I tried to include Setup.h but it said Setup.h wasnt found (And its in same compile) So if anyone can help do it pls!

    [Help] What I did wrong?
  2. #2
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put another } at the end of the file and see if that helps.

  3. #3
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not worked.. Now it says me:

    Code:
    .FunctionNPC.cpp(59) : error C2059: syntax error : '{'
    .FunctionNPC.cpp(59) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    .FunctionNPC.cpp(111) : fatal error C1004: unexpected end-of-file found
    I also tried to put a 2nd } but now it says:

    Code:
    .FunctionNPC.cpp(59) : error C2059: syntax error : '{'
    .FunctionNPC.cpp(59) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
    .FunctionNPC.cpp(113) : fatal error C1075: end of file found before the left brace '{' at '.FunctionNPC.cpp(37)' was matched
    Last edited by darkgabou15; 06-08-2008 at 01:33 PM.

  4. #4
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:
    Code:
    #include "StdAfx.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)        // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    /************************************************************************/
    /* GENERAL GUARD SCRIPT                                                 */
    /************************************************************************/
    
    // Covers *all* guard types, scripting their texts to guide players around.
    // Enable this define to make all gossip texts have a "back" / "I was looking
    // for somethinge else" button added.
    
    #define BACK_BUTTON
    
    #ifdef BACK_BUTTON
    
    // Make code neater with this define.
    #define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); 
        Menu->SendTo(Plr);
    
    #else
    
    // Make code neater with this define.
    #define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); 
        Menu->AddItem(0, "I wanna do something else.", 0); 
        Menu->SendTo(Plr);
    
    #endif
    
    /************************************************************************/
    /* WoWNezz Functions NPC                                                */
    /************************************************************************/
    
    class SCRIPT_DECL StormwindGuard : 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, "Player Tools", 1);
            Menu->AddItem(0, "Server Tools", 2);
            Menu->AddItem(0, "Morphs Menu", 3);
            Menu->AddItem(0, "Support", 4);
            Menu->AddItem(0, "Vote for us at WoWNezzRealms.tk!", 5);   
    
            if(AutoSend)
                Menu->SendTo(Plr);
        }
    
        void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        {
            GossipMenu * Menu;
            switch(IntId)
            {
            case 0:     // Return to start
                GossipHello(pObject, Plr, true);
                break;
    
    
                // Player Tools Menu
    
            case 1:   //Player Tools menu
    
                {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
                    Menu->AddItem( 0, "Force Rename Character", 10);
                    Menu->AddItem( 0, "Suicide!"     , 11);
                    Menu->SendTo(Plr);
                }break;
    
            case 2:   //Server Tools menu
    
                {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
                    Menu->AddItem( 0, "Server Stats", 20);
                    Menu->AddItem( 0, "Show Message of the Day"     , 21);
                    Menu->SendTo(Plr);
                }break;
    
            case 3:   //Morphs menu!
            
            }
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);        
                    Menu->AddItem(0, "Criter Morph", 30)
                    Menu->AddItem(0, "Animals Morph", 31)
                    Menu->AddItem(0, "Elemental Morph", 32)
                    Menu->AddItem(0, "Humanoid Morph", 33)
                    Menu->AddItem(0, "Boss Morphs", 34)
                    Menu->AddItem(0, "Other Morphs", 35)
        }
    }
    
    
    
    void SetupGuardGossip(ScriptMgr * mgr)
    {
        GossipScript * sw = (GossipScript*) new StormwindGuard();
            
        mgr->register_gossip_script(68,    sw); 
    
    }
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  5. #5
    darkgabou15's Avatar Banned
    Reputation
    54
    Join Date
    Mar 2007
    Posts
    66
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope... Now getting error:

    Code:
    .FunctionNPC.cpp(21) : error C2143: syntax error : missing ';' before '->'
    .FunctionNPC.cpp(21) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    .FunctionNPC.cpp(103) : error C2628: 'StormwindGuard' followed by 'void' is illegal (did you forget a ';'?)
    .FunctionNPC.cpp(90) : error C2143: syntax error : missing ';' before '}'
    .FunctionNPC.cpp(93) : error C2146: syntax error : missing ';' before identifier 'Menu'
    .FunctionNPC.cpp(94) : error C2146: syntax error : missing ';' before identifier 'Menu'
    .FunctionNPC.cpp(95) : error C2146: syntax error : missing ';' before identifier 'Menu'
    .FunctionNPC.cpp(96) : error C2146: syntax error : missing ';' before identifier 'Menu'
    .FunctionNPC.cpp(97) : error C2146: syntax error : missing ';' before identifier 'Menu'
    .FunctionNPC.cpp(98) : error C2143: syntax error : missing ';' before '}'
    Build log was saved at "file://c:Documents and SettingsAcerBureauAscent Sou
    I'm feeling bored now -.-

  6. #6
    Dythzer's Avatar Contributor
    Reputation
    271
    Join Date
    May 2008
    Posts
    461
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    should remove some errors, maybe not all

    Code:
    #include "StdAfx.h"
    
    #ifdef WIN32
    #pragma warning(disable:4305)        // warning C4305: 'argument' : truncation from 'double' to 'float'
    #endif
    
    /************************************************************************/
    /* GENERAL GUARD SCRIPT                                                 */
    /************************************************************************/
    
    // Covers *all* guard types, scripting their texts to guide players around.
    // Enable this define to make all gossip texts have a "back" / "I was looking
    // for somethinge else" button added.
    
    #define BACK_BUTTON
    
    #ifdef BACK_BUTTON
    
    // Make code neater with this define.
    #define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); 
        Menu->SendTo(Plr);
    
    #else
    
    // Make code neater with this define.
    #define SendQuickMenu(textid) objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), textid, Plr); 
        Menu->AddItem(0, "I wanna do something else.", 0); 
        Menu->SendTo(Plr);
    
    #endif
    
    /************************************************************************/
    /* WoWNezz Functions NPC                                                */
    /************************************************************************/
    
    class SCRIPT_DECL StormwindGuard : 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, "Player Tools", 1);
            Menu->AddItem(0, "Server Tools", 2);
            Menu->AddItem(0, "Morphs Menu", 3);
            Menu->AddItem(0, "Support", 4);
            Menu->AddItem(0, "Vote for us at WoWNezzRealms.tk!", 5);   
    
            if(AutoSend)
                Menu->SendTo(Plr);
        }
    
        void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
        {
            GossipMenu * Menu;
            switch(IntId)
            {
            case 0:     // Return to start
                GossipHello(pObject, Plr, true);
                break;
    
    
                // Player Tools Menu
    
            case 1:   //Player Tools menu
    
                {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
                    Menu->AddItem( 0, "Force Rename Character", 10);
                    Menu->AddItem( 0, "Suicide!"     , 11);
                    Menu->SendTo(Plr);
                }break;
    
            case 2:   //Server Tools menu
    
                {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);
                    Menu->AddItem( 0, "Server Stats", 20);
                    Menu->AddItem( 0, "Show Message of the Day"     , 21);
                    Menu->SendTo(Plr);
                }break;
    
            case 3:   //Morphs menu!
            
    {
                    objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 4264, Plr);        
                    Menu->AddItem(0, "Criter Morph", 30);
                    Menu->AddItem(0, "Animals Morph", 31);
                    Menu->AddItem(0, "Elemental Morph", 32);
                    Menu->AddItem(0, "Humanoid Morph", 33);
                    Menu->AddItem(0, "Boss Morphs", 34);
                    Menu->AddItem(0, "Other Morphs", 35);
    		}
    }
    
    
    
    void SetupGuardGossip(ScriptMgr * mgr)
    {
        GossipScript * sw = (GossipScript*) new StormwindGuard();
            
        mgr->register_gossip_script(68,    sw); 
    
    }

  7. #7
    Dragon[Sky]'s Avatar Anti-social Engineer
    Reputation
    847
    Join Date
    Apr 2007
    Posts
    1,416
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do you use #define macros!? ;_;
    They're horrible. D:


Similar Threads

  1. [Help] What's Wrong
    By sobieski in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 04-02-2008, 03:31 PM
  2. [Need help] What's wrong with this script?
    By Arthas117 in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 01-10-2008, 02:04 PM
  3. HELP: What do i do after i download a patch??? Pls help
    By joms in forum WoW ME Questions and Requests
    Replies: 4
    Last Post: 09-30-2007, 08:16 AM
  4. DynDNS help. What am I doing wrong?
    By xxtennisdudexx in forum World of Warcraft Emulator Servers
    Replies: 21
    Last Post: 09-23-2007, 05:23 PM
All times are GMT -5. The time now is 08:47 PM. 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