Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Support > Archive::Windows Servers

Archive::Windows Servers Archive area for Windows Servers's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2004, 08:59 PM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default Errors while compiling

I am using VS C++ 6.0 to compile this, and i am getting the following errors while trying to compile zone.exe

Code:
C:\Documents and Settings\Default\Desktop\EQEMu-05-08-2004\Zone\client_process.cpp(5021) : error C2086: 'i' : redefinition

C:\Documents and Settings\Default\Desktop\EQEMu-05-08-2004\Zone\npc.cpp(429) : error C2065: 'cit_timer' : undeclared identifier

C:\Documents and Settings\Default\Desktop\EQEMu-05-08-2004\Zone\npc.cpp(429) : error C2227: left of '->Check' must point to class/struct/union
Any ideas on what this is all about? i never get these errors when i compile using the VS.net Free version but i am sick of having to create a new accout every 3 hours of working, and i know i have read posts that people have used visual c++ to compile this.. so any help would be much appriciated thanks much =)
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
Reply With Quote
  #2  
Old 05-09-2004, 02:45 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default Re: Errors while compiling

C:\Documents and Settings\Default\Desktop\EQEMu-05-08-2004\Zone\client_process.cpp(5021) : error C2086: 'i' : redefinition

To fix this, edit client_process.cpp. Around line 5021, change the 'i' to a 'j' in the for loop:

Code:
for(int j = 0; j < 9; j++)
        {
                sze->equip[j] = GetEquipmentMaterial(j);
                sze->colors[j].color = GetEquipmentColor(j);
        }


C:\Documents and Settings\Default\Desktop\EQEMu-05-08-2004\Zone\npc.cpp(429) : error C2065: 'cit_timer' : undeclared identifier

This error seems to be caused because that bit of code should only be compiled for GUILDWARS and was introduced with the 05-08 source. Edit npc.cpp, goto line 429 and #ifdef that code, i.e.

Code:
#ifdef GUILDWARS
        if(cit_timer && cit_timer->Check())
        {
                Depop();
                return false;
        }
#endif


C:\Documents and Settings\Default\Desktop\EQEMu-05-08-2004\Zone\npc.cpp(429) : error C2227: left of '->Check' must point to class/struct/union

That error will probably go away when you fix the previous one.
Reply With Quote
  #3  
Old 05-09-2004, 09:49 AM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

Thanks going to try it now =)
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
Reply With Quote
  #4  
Old 05-09-2004, 09:57 AM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

Woot thanks works without a flaw, although it worked i still don't understand why the first error occured was it just that i was defined incorrectly? or i am just not really sure. but anyway it works now! thanks much.
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
Reply With Quote
  #5  
Old 05-09-2004, 09:59 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Charmy
Woot thanks works without a flaw, although it worked i still don't understand why the first error occured was it just that i was defined incorrectly? or i am just not really sure. but anyway it works now! thanks much.
Search for C2086, that issue has come up before with Viusal C++ 6.0, e.g.

http://www.eqemulator.net/forums/vie...ighlight=c2086

Just changes to the language specs etc ...
Reply With Quote
  #6  
Old 05-09-2004, 08:28 PM
Sith_Lord
Fire Beetle
 
Join Date: May 2004
Posts: 5
Default

Quote:
Originally Posted by Charmy
although it worked i still don't understand why the first error occured was it just that i was defined incorrectly?
'i' is quite a common variable name for counters and the like, but once a name has been defined within a scope it cant be redefined. So for example you cant have it as a string then immediately redefine it as an int. This also included defining it as the same thing again. Somewhere in that code block, i had been set up as a variable, then in this new release someone had dropped in a chunk that used a 'new' i. So changing every instance of one of the 'i's to another name fixes that issue.

Luke
Reply With Quote
  #7  
Old 05-10-2004, 07:38 AM
Charmy
Discordant
 
Join Date: May 2004
Location: The DeathStar of David
Posts: 337
Default

So could you have in theroy changed it to any other unused variable? and it would have worked, or was J defined up earlier somewhere in the code that needed to be used? btw thanks for all the help. learning more everyday =)
__________________
Mess with the Jews, and we will take all your money
Grunties Rule
And with that... I end
Any Other Questions, please refer to the Following:
http://iliilllli1.netfirms.com
Reply With Quote
  #8  
Old 05-10-2004, 08:05 AM
Sith_Lord
Fire Beetle
 
Join Date: May 2004
Posts: 5
Default

yeah, you defined it in the for loop when you said "int j;" basically that creates a variable called j inside that for loop. variable defiitions inherit downwards but not up - i.e. you coudlnt reference that j outside of the for loop, but somewhere above, i had already been defined, so that definition was inherited into the for loop, so you couldnt redefine it anywhere down-the-tree from where it was defined.

basically what the line you changed said was, this is a for loop . The condition at the start is that j is an int and equals 0; we run the for loop while ever j is less than 9 and at the end of each run through the loop j needs to be incremented. Then everything between the {}s is what needs doing each run thru. So yeah you could have used anything that wasnt already defined as long as everywhere in the loop you changed the j to be whatever.

sorry, a bit off topic

Luke
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:22 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3