im having some C++ issues menu

User Tag List

Results 1 to 9 of 9
  1. #1
    ringmas212's Avatar Corporal
    Reputation
    5
    Join Date
    Aug 2007
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    im having some C++ issues

    hi, i am having so bug issues with a script of mine, can i get some help? i would greatly appreciate the help

    (spellauras.cpp)




    case 15286://Vampiric Embrace
    {
    if(apply)
    {
    SetNegative();
    Unit * caster =this->GetUnitCaster();
    if(caster && caster->IsPlayer())
    ((Player*)caster)->m_vampiricEmbrace++;
    ++m_target->m_hasVampiricEmbrace;
    }
    else
    {
    Unit * caster =this->GetUnitCaster();
    if(caster && caster->IsPlayer())
    ((Player*)caster)->m_vampiricEmbrace--;
    --m_target->m_hasVampiricEmbrace;
    }
    }break;

    thank u so much for taking some time to help me out
    Those who Fear Death have not Lived a Life and those Fear Death are Already Dead

    These ads disappear when you log in.

  2. #2
    namelessgnome's Avatar Contributor
    Reputation
    108
    Join Date
    May 2007
    Posts
    263
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    First of all you could post it on pastebin or atleast in a code box.

    With bug do you mean a compile time error, a runtime crash or faulty behavior from the script?

  3. #3
    skatercam11's Avatar Sergeant
    Reputation
    11
    Join Date
    Jun 2008
    Posts
    56
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And why is your break outside of the case statement? What exactly is WRONG anyways? It's like you're saying this:

    "Help guys, I really appreciate it *inserts pic of a deformed cake*"

    ...wut?

  4. #4
    ringmas212's Avatar Corporal
    Reputation
    5
    Join Date
    Aug 2007
    Posts
    28
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    its not processing the way it should like its not doing wat its supposed to, its not wokring the wat it was ittended
    Those who Fear Death have not Lived a Life and those Fear Death are Already Dead

  5. #5
    skatercam11's Avatar Sergeant
    Reputation
    11
    Join Date
    Jun 2008
    Posts
    56
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yet again you're being extremely vague. You: "Well I made this cake, but its not doing what it's supposed to. I dunno. It just not intended. You know?"

    Code:
    case 15286:  //Vampiric Embrace
    {
    	if(apply)
    	{
    		SetNegative();
    		Unit * caster =this->GetUnitCaster();
    		if(caster && caster->IsPlayer())
    		{
    			((Player*)caster)->m_vampiricEmbrace++;
    			++m_target->m_hasVampiricEmbrace;
    		}
    	}
    	else
    	{
    		Unit * caster =this->GetUnitCaster();
    		if(caster && caster->IsPlayer())
    		{
    			((Player*)caster)->m_vampiricEmbrace--;
    			--m_target->m_hasVampiricEmbrace;
    		}
    	}
    	
    	break;
    }
    Dear lord dude, you were not even using brackets after your if statements. Just a word of advice, learn the language before jumping into anything huge, for instance creating scripts for WoW servers :-P.

    Try the above code, it might help, not quite sure.

  6. #6
    namelessgnome's Avatar Contributor
    Reputation
    108
    Join Date
    May 2007
    Posts
    263
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This ain't the OPs code, it's from his emulator

    Also; I do think that the --m_target->m_hasVampiricEmbrace;
    should be outside the if(caster ...) block

    therefore the one line ifs

    Except adding that bugged bahavior your code is just an indented version of what the OP posted
    Last edited by namelessgnome; 08-04-2009 at 04:32 AM. Reason: typo

  7. #7
    skatercam11's Avatar Sergeant
    Reputation
    11
    Join Date
    Jun 2008
    Posts
    56
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have no clue as I have never coded for an emulator before, and I indented it for the sake of making it easier to read, and his if loops were coded without any brackets, which wouldn't have been compiled correctly.

  8. #8
    Gateraze's Avatar Private
    Reputation
    1
    Join Date
    Aug 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i Think u should repost with a bit more comment and you code a litte bit clearer so we can see what exactly u want to do
    skatercam11 as a good post for showing how it should be displayed

    The gateraze

  9. #9
    LongBow's Avatar Private
    Reputation
    5
    Join Date
    Aug 2008
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by skatercam11 View Post
    I have no clue as I have never coded for an emulator before, and I indented it for the sake of making it easier to read, and his if loops were coded without any brackets, which wouldn't have been compiled correctly.
    It will compile fine without the code blocks after the if statements. "Just a word of advice, learn the language before jumping into anything..."

Similar Threads

  1. FFXIV Bot (Some issues and I have some questions)
    By Veritable in forum MMO Exploits|Hacks
    Replies: 9
    Last Post: 05-07-2011, 01:29 PM
  2. Sir, you have some issues.
    By fredalbob in forum Screenshot & Video Showoff
    Replies: 2
    Last Post: 06-02-2010, 12:05 PM
  3. Hey i have some requests
    By Rainofhell in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 01-04-2007, 02:24 PM
  4. I would like to start model editing....i have some questions.
    By foxfire60 in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-04-2006, 01:19 PM
  5. Help need to have some on edit this for me!!
    By cantkill in forum WoW ME Questions and Requests
    Replies: 6
    Last Post: 11-18-2006, 11:41 AM
All times are GMT -5. The time now is 04:09 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search