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 |
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++) 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 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. |
Thanks going to try it now =)
|
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.
|
Quote:
http://www.eqemulator.net/forums/vie...ighlight=c2086 Just changes to the language specs etc ... |
Quote:
Luke |
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 =)
|
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 |
All times are GMT -4. The time now is 07:30 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.