[C++] Codebox menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [C++] Codebox

    At the moment I'm working on my second script. I want to use the code box for something. At this point I'm pulling my hair out wondering what I'm doing wrong.

    Heres a general idea of what is happening.

    Code:
    
    Menu->AddItem(0, "Enter hello", 1, 1);
    
    if(Code == "hello")
    {
         plr->BroadcastMessage("You've won");
    }
    else
    {
         plr->BroadcastMessage("You've failed");
         plr->BroadcastMessage("%s, is the code you typed in.", Code);
    }
    Pretty much what happens is i have this pop up on my screen.

    You've failed
    hello, is the code you typed in.


    So... the code says i typed in hello, but hello != hello?

    Any help would be awesome.
    Last edited by Vision1000; 10-15-2009 at 12:22 AM.

    [C++] Codebox
  2. #2
    Ballwinkle's Avatar Contributor Authenticator enabled
    Reputation
    124
    Join Date
    Mar 2007
    Posts
    662
    Thanks G/R
    0/12
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Post your whole script please!

    but make sure your void has the code init eg.
    void MyScript::GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)

    also you could add some extra checks
    if(!Code)
    {
    Plr->BroadcastMessage("You must enter some text);
    }
    Hope this helps

    -Ball

  3. #3
    Vision1000's Avatar Member
    Reputation
    104
    Join Date
    Jun 2008
    Posts
    122
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    plr->BroadcastMessage("%s, is the code you typed in.", Code);
    It will broadcast to me exactly what i typed in the code box, even if it is == to "hello".

    And const char * Code is at the top.

    edit: Do you think its a core problem?

    Arcemu r2945
    Last edited by Vision1000; 10-15-2009 at 02:03 AM.

Similar Threads

  1. [Trinity] Need Help Making Trinity Codebox C++
    By Zellcorp in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 07-09-2010, 08:44 AM
  2. [Lua] Codebox not working
    By Dynashock in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 07-14-2009, 05:21 PM
  3. [C++] CodeBox Npc
    By mager1794 in forum WoW EMU General Releases
    Replies: 7
    Last Post: 06-03-2009, 04:19 PM
All times are GMT -5. The time now is 02:11 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