Menu->AddItem menu

User Tag List

Results 1 to 10 of 10
  1. #1
    BinaryX's Avatar Corporal
    Reputation
    1
    Join Date
    Sep 2010
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Menu->AddItem

    How would i do something like:
    Code:
    Menu->AddItem(0, "You have " << Plr->MPoints << " points.", 1);
    This returns an error.

    Menu-&gt;AddItem
  2. #2
    Zymus's Avatar Active Member
    Reputation
    15
    Join Date
    Sep 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Shouldn't it be:
    Code:
    Menu->AddItem(0, "You have " << Plr->getMPoints() << " points.", 1);

  3. #3
    BinaryX's Avatar Corporal
    Reputation
    1
    Join Date
    Sep 2010
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No i get getMPoints is not a member of Player, but does it really matter?

  4. #4
    Zymus's Avatar Active Member
    Reputation
    15
    Join Date
    Sep 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If mPoints is a private member, then the only way you can access it is by making a public getter/setter. I don't know how you've programmed it, but if mPoints is a private member, then you have to make a public getter/setter for it.

  5. #5
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by BinaryX View Post
    Menu->AddItem(0, "You have " << Plr->MPoints << " points.", 1);
    You really need to learn the basics of C++ before you do things like this.

    You can't use a overload operator in that context, you aren't dealing with std::cout here. You're declaring a string constant.
    This is rather stupid in my point of view.

    Go learn basics!
    Last edited by Link_S; 09-19-2010 at 01:51 PM. Reason: included a quote by misstake..
    Why do I need a signature?

  6. #6
    BinaryX's Avatar Corporal
    Reputation
    1
    Join Date
    Sep 2010
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol i guess i should :P

  7. #7
    Zymus's Avatar Active Member
    Reputation
    15
    Join Date
    Sep 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Java != C*

  8. #8
    Thetruecrow's Avatar Active Member
    Reputation
    65
    Join Date
    Nov 2008
    Posts
    79
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    	stringstream message;
    	message << "You have " << Plr->MPoints << " points.";
    	Menu->AddItem(0, message.str().c_str(), 1);
    This will work if you are using the standard namespace std, which I'm pretty sure ArcEmu does.
    If not, then just change stringstream to std::stringstream.

  9. #9
    BinaryX's Avatar Corporal
    Reputation
    1
    Join Date
    Sep 2010
    Posts
    24
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Zymus View Post
    Java != C*
    noshit .

  10. #10
    Zymus's Avatar Active Member
    Reputation
    15
    Join Date
    Sep 2009
    Posts
    87
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well it looks like you're trying to mix Java syntax with C operations.

Similar Threads

  1. (WINDOWS HACK) Changing Start Menu Text
    By friendofdar in forum Community Chat
    Replies: 7
    Last Post: 11-22-2007, 08:40 PM
  2. Request: Warcraft 3 Main Menu's.
    By SteiniDJ in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 08-14-2007, 08:31 PM
  3. Main Menu change (BC theme to Draenei theme)
    By Aligatro in forum World of Warcraft Model Editing
    Replies: 4
    Last Post: 08-04-2007, 07:39 PM
  4. Add a dropdown menu to the Flash Chat link
    By leoj in forum Suggestions
    Replies: 2
    Last Post: 02-15-2007, 09:21 AM
  5. Looking for a list of .additems for gms
    By sabend in forum World of Warcraft General
    Replies: 13
    Last Post: 11-23-2006, 10:34 PM
All times are GMT -5. The time now is 06:14 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