Bug compiling

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Stix
orc pawn
orc pawn
Posts: 14
Joined: Tue Apr 20, 2004 12:39 am

Bug compiling

Post by Stix » Thu Oct 21, 2010 9:16 pm

I get this error while compiling the new build. Never got this before.

Code: Select all

M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(833) : error C2374: 'nPack' : redefinition; multiple initialization
        M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(781) : see declaration of 'nPack'
M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(1184) : error C2374: 'nPack' : redefinition; multiple initialization
        M:\MQ2-20101021\MQ2Main\MQ2Data.cpp(1124) : see declaration of 'nPack'
MQ2DataAPI.cpp
Am Using C++ 6.0

Thanks

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Re: Bug compiling

Post by ieatacid » Thu Oct 21, 2010 9:48 pm

Stix wrote: Am Using C++ 6.0
Therein lies your problem :)

yuli
decaying skeleton
decaying skeleton
Posts: 5
Joined: Thu Aug 16, 2007 11:20 am

Re: Bug compiling

Post by yuli » Thu Oct 21, 2010 11:03 pm

Downloading the correct compiler . Thanks for all you do.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Bug compiling

Post by dewey2461 » Thu Oct 21, 2010 11:21 pm

There are two instances where the for loops have in line declared variables.

Code: Select all

   
    for (unsigned long nPack = 0 ; nPack < NUM_BANK_SLOTS ; nPack++)



need to remove the unsigned long and move it outside to the top of the first loop.

Code: Select all

    unsigned long nPack;
    for (nPack=0 ; nPack < NUM_BANK_SLOTS ; nPack++)
    {
          .....
    }

    for (nPack=0 ; nPack < NUM_BANK_SLOTS ; nPack++)
    {
          .....
    }

    

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Re: Bug compiling

Post by dont_know_at_all » Thu Oct 21, 2010 11:45 pm

fixed in next zip.