need help with this c++ code menu

Shout-Out

User Tag List

Results 1 to 6 of 6
  1. #1
    igud2's Avatar Member
    Reputation
    10
    Join Date
    Nov 2007
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    need help with this c++ code

    Code:
    if (!aur)
            return;
        if(m_mapId!=530 && (m_mapId!=571   || (IsPlayer() && !((Player*)this)->HasSpellwithNameHash(SPELL_HASH_COLD_WEATHER_FLYING))))
        // can't use flying auras in non-outlands or non-northrend (northrend requires cold weather flying)
        {
            for( uint32 i = 0; i < 3; ++i )
    i need help with it being changed to all 4 map ids 530,571,0,1

    as i have tried to do this myself many times i just keep getting a syntax error everytime i try to complie with arcemu

    need help with this c++ code
  2. #2
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    if (!aur)
            return;
        if(m_mapId!=530 && (m_mapId!=571  || m_mapId != 0 || m_mapId != 1 || (IsPlayer() && !((Player*)this)->HasSpellwithNameHash(SPELL_HASH_COLD_WEATHER_FLYING))))
        // can't use flying auras in non-outlands or non-northrend (northrend requires cold weather flying)
        {
            for( uint32 i = 0; i < 3; ++i )

    Should be fine.
    Last edited by Aznex; 05-05-2009 at 04:18 PM. Reason: Where did my code box go!

  3. #3
    igud2's Avatar Member
    Reputation
    10
    Join Date
    Nov 2007
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Aznex View Post
    Code:
    if (!aur)
            return;
        if(m_mapId!=530 && (m_mapId!=571  || m_mapId != 0 || m_mapId != 1 || (IsPlayer() && !((Player*)this)->HasSpellwithNameHash(SPELL_HASH_COLD_WEATHER_FLYING))))
        // can't use flying auras in non-outlands or non-northrend (northrend requires cold weather flying)
        {
            for( uint32 i = 0; i < 3; ++i )

    Should be fine.


    the error log i get when compiling with that code xd
    Code:
     Build started: Project: arcemu-world, Configuration: Release|Win32
    
    
    Command Lines   Creating temporary file "c:\Documents and Settings\Owner\Desktop\ArcEmu\trunk\win\VC90\arcemu-world___Win32_Release\RSP00000437322904.rsp" with contents
    [
    /Ox /Ob2 /Oi /Ot /Oy /GL /I "..\..\src\boost" /I "..\..\src\arcemu-shared" /I "..\..\src\arcemu-world\Collision\vmap" /I "..\..\src\arcemu-world\Collision\g3dlite" /I "..\..\extras\arcemu-windows-libraries\VC\include" /D "_HAS_ITERATOR_DEBUGGING=0" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_MBCS" /GF /FD /EHsc /MD /GS- /fp:fast /Yu"stdafx.h" /Fp".\arcemu-world___Win32_Release/game.pch" /Fo".\arcemu-world___Win32_Release/" /Fd".\arcemu-world___Win32_Release/" /W3 /c /Zi  /MP /Zm256
    
    "..\..\src\arcemu-world\Unit.cpp"
    ]
    Creating command line "cl.exe @"c:\Documents and Settings\Owner\Desktop\ArcEmu\trunk\win\VC90\arcemu-world___Win32_Release\RSP00000437322904.rsp" /nologo /errorReport:prompt"
    Output Window   Compiling...
    Unit.cpp
    ..\..\src\arcemu-world\Unit.cpp(4301) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4302) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4302) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4309) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4310) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4310) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4434) : error C2059: syntax error : 'else'
    ..\..\src\arcemu-world\Unit.cpp(4435) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4435) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4448) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4449) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4449) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4457) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4458) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4458) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4468) : error C2065: 'aur' : undeclared identifier
    ..\..\src\arcemu-world\Unit.cpp(4468) : error C2227: left of '->GetTarget' must point to class/struct/union/generic type
            type is ''unknown-type''
    ..\..\src\arcemu-world\Unit.cpp(4469) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4470) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4470) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4483) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4484) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4484) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4493) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4495) : error C2143: syntax error : missing ';' before '->'
    ..\..\src\arcemu-world\Unit.cpp(4495) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    ..\..\src\arcemu-world\Unit.cpp(4496) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    ..\..\src\arcemu-world\Unit.cpp(4496) : error C2078: too many initializers
    ..\..\src\arcemu-world\Unit.cpp(4499) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4502) : error C2143: syntax error : missing ';' before '->'
    ..\..\src\arcemu-world\Unit.cpp(4502) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    ..\..\src\arcemu-world\Unit.cpp(4502) : error C2086: 'int aur' : redefinition
            ..\..\src\arcemu-world\Unit.cpp(4495) : see declaration of 'aur'
    ..\..\src\arcemu-world\Unit.cpp(4504) : error C2057: expected constant expression
    ..\..\src\arcemu-world\Unit.cpp(4504) : error C2466: cannot allocate an array of constant size 0
    ..\..\src\arcemu-world\Unit.cpp(4504) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    ..\..\src\arcemu-world\Unit.cpp(4504) : error C2440: 'initializing' : cannot convert from 'int' to 'int []'
            There are no conversions to array types, although there are conversions to references or pointers to arrays
    ..\..\src\arcemu-world\Unit.cpp(4505) : error C2143: syntax error : missing ';' before '->'
    ..\..\src\arcemu-world\Unit.cpp(4505) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    ..\..\src\arcemu-world\Unit.cpp(4505) : error C2086: 'int aur' : redefinition
            ..\..\src\arcemu-world\Unit.cpp(4495) : see declaration of 'aur'
    ..\..\src\arcemu-world\Unit.cpp(4509) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4510) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4510) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4516) : error C2143: syntax error : missing ';' before '->'
    ..\..\src\arcemu-world\Unit.cpp(4516) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    ..\..\src\arcemu-world\Unit.cpp(4516) : error C2086: 'int aur' : redefinition
            ..\..\src\arcemu-world\Unit.cpp(4495) : see declaration of 'aur'
    ..\..\src\arcemu-world\Unit.cpp(4519) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4520) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4520) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4540) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4541) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4541) : error C2447: '{' : missing function header (old-style formal list?)
    ..\..\src\arcemu-world\Unit.cpp(4554) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4556) : error C2059: syntax error : 'if'
    ..\..\src\arcemu-world\Unit.cpp(4559) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    ..\..\src\arcemu-world\Unit.cpp(4559) : error C2078: too many initializers
    ..\..\src\arcemu-world\Unit.cpp(4560) : error C2059: syntax error : '}'
    ..\..\src\arcemu-world\Unit.cpp(4560) : error C2143: syntax error : missing ';' before '}'
    ..\..\src\arcemu-world\Unit.cpp(4560) : error C2059: syntax error : '}'
    ..\..\src\arcemu-world\Unit.cpp(4563) : error C2143: syntax error : missing ';' before '{'
    ..\..\src\arcemu-world\Unit.cpp(4563) : error C2447: '{' : missing function header (old-style formal list?)
    Results   Build log was saved at "file://c:\Documents and Settings\Owner\Desktop\ArcEmu\trunk\win\VC90\arcemu-world___Win32_Release\BuildLog.htm"
    arcemu-world - 60 error(s), 0 warning(s)
    nvm fixed it
    Last edited by igud2; 05-06-2009 at 12:38 AM. Reason: fixed

  4. #4
    LaAevie's Avatar Member
    Reputation
    85
    Join Date
    Mar 2008
    Posts
    143
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if (!aur)
    return;
    if(m_mapId!=530 && (m_mapId!=571 || m_mapId != 0 || m_mapId != 1 || (IsPlayer() && !((Player*)this)->HasSpellwithNameHash(SPELL_HASH_COLD_WEATHER_FLYING))))
    // can't use flying auras in non-outlands or non-northrend (northrend requires cold weather flying)
    {
    for( uint32 i = 0; i < 3; ++i )
    is that all you added to it? you do not have any ending brackets, and that is what I am seeing in the error.
    <3

  5. #5
    igud2's Avatar Member
    Reputation
    10
    Join Date
    Nov 2007
    Posts
    47
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by N2Dark View Post
    is that all you added to it? you do not have any ending brackets, and that is what I am seeing in the error.
    ya i corrected it finally xd

  6. #6
    Aznex's Avatar Contributor
    Reputation
    128
    Join Date
    Feb 2008
    Posts
    770
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by igud2 View Post
    ya i corrected it finally xd
    Well seriously I thought U knew atleast that >.< I just added the stuff where it had to be added.

Similar Threads

  1. Need help with this LUA script, please.
    By Eliteplague in forum WoW Bots Questions & Requests
    Replies: 6
    Last Post: 11-18-2011, 01:27 PM
  2. [Mangos] need help with this web script
    By eric125 in forum WoW EMU Questions & Requests
    Replies: 2
    Last Post: 07-20-2010, 10:56 PM
  3. [Lua Script] Need help with this lua gossip script
    By diviee3 in forum WoW EMU Questions & Requests
    Replies: 1
    Last Post: 06-21-2010, 07:52 PM
  4. [Help] With this C++ Code.
    By jokerjokes in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 01-22-2008, 09:42 AM
All times are GMT -5. The time now is 06:52 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