Misc.cpp errors

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
aergad
Posts: 3
Joined: Sat May 23, 2009 4:34 pm

Misc.cpp errors

Post by aergad » Sat May 23, 2009 5:32 pm

In Misc.cpp this starting at line 276

Code: Select all

bool alpha_check(unsigned char val){
	if((val >= 0x41 && val <=0x5A) || (val >= 0x61 && val <=0x7A))
		return true;
	else
		return false;
<<<<<<< .mine
}

=======
}

int GetItemNameCrc(string item_name){
	const char *src = item_name.c_str();
	uLong crc = crc32(0L, Z_NULL, 0);    
    crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
return sint32(crc) * -1;

}>>>>>>> .r679
needs to be changed to

Code: Select all

bool alpha_check(unsigned char val){
	if((val >= 0x41 && val <=0x5A) || (val >= 0x61 && val <=0x7A))
		return true;
	else
		return false;
}

int GetItemNameCrc(string item_name){
	const char *src = item_name.c_str();
	uLong crc = crc32(0L, Z_NULL, 0);    
    crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
return sint32(crc) * -1;

}
in order to compile on windows or linux with the latest svn revision available

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Misc.cpp errors

Post by John Adams » Sat May 23, 2009 7:01 pm

misc.cpp is not like that on SVN, in either the dev or public svn.

delete misc.cpp from your World folder and re-update. a fresh one will come down.

what that is telling you is there was a change to your misc.cpp that SVN tried to merge, and couldn't. So it commenting your code vs SVN's so your changes are not lost. If you made no changes, then shrug. Delete the file and re-update.

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Misc.cpp errors

Post by paulgh » Sun May 24, 2009 5:08 pm

Hi John,

I'm going to have to beg to differ, as I just check the sourceforge svn, both with viewvc and rechecking out the file. I remember seeing this back in April, but as it was minor and caused errors, I had assumed it had been a momentary glitch. I always use the compiled exe, so I forgot all about it.

BTW: misc.cpp is in common, not world. Just to be sure we're looking at the same file.

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Misc.cpp errors

Post by alfa » Sun May 24, 2009 5:40 pm

Hi,
I having trouble with Misc.cpp too (on linux compile)
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Misc.cpp errors

Post by John Adams » Sun May 24, 2009 6:03 pm

paulgh wrote:Hi John,

I'm going to have to beg to differ, as I just check the sourceforge svn, both with viewvc and rechecking out the file. I remember seeing this back in April, but as it was minor and caused errors, I had assumed it had been a momentary glitch. I always use the compiled exe, so I forgot all about it.

BTW: misc.cpp is in common, not world. Just to be sure we're looking at the same file.
Along with the thousands of other things that continue to mystify me, today I do see an issue with the April 25th checkin of misc.cpp. I'll clean it up and recommit. Should hit the public SVN tomorrow morning.

Sorry for the confusion -- and so I don't sound like an utter fool, I swear on the private (dev, which feeds public) SVN this is what it looks like:

Code: Select all

bool alpha_check(unsigned char val){
	if((val >= 0x41 && val <=0x5A) || (val >= 0x61 && val <=0x7A))
		return true;
	else
		return false;
}

int GetItemNameCrc(string item_name){
	const char *src = item_name.c_str();
	uLong crc = crc32(0L, Z_NULL, 0);    
    crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
return sint32(crc) * -1;

}
Looked ok to me. :roll: Not sure why going from one SVN to the other (automatically) would create that problem.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Misc.cpp errors

Post by Zcoretri » Sun May 24, 2009 6:05 pm

Ha, thanks JA...I was just posting that in the public SVN it indeed was messed up somehow...looked like around ver 677 - 679?

paulgh
Retired
Posts: 51
Joined: Sun Jul 27, 2008 8:48 pm

Re: Misc.cpp errors

Post by paulgh » Mon May 25, 2009 10:24 am

Hi John,

Something has gone out of whack somewhere, as it's now even worse.

Code: Select all

 		return false;
 <<<<<<< .mine
 }
 
 =======
 }
 
 int GetItemNameCrc(string item_name){
 	const char *src = item_name.c_str();
 	uLong crc = crc32(0L, Z_NULL, 0);
     crc = crc32(crc, (unsigned const char *)src,strlen(src)) + 1;
 return sint32(crc) * -1;
 
 <<<<<<< .mine
 }>>>>>>> .r679
 =======
 }
 >>>>>>> .r706

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Misc.cpp errors

Post by John Adams » Mon May 25, 2009 12:01 pm

Awright, I tried to fix it by what I thought was a normal process, but apparently LE has some other magic going on between the two SVN's.

I do not have write access to public SVN, so we'll have to wait til he gets back from holiday to sort this out. Meanwhile, just remove those <<< >>> lines and any dupe code.

Sorry for making it worse. It still looks perfect on the Dev SVN :) Attaching the "clean" misc.cpp that goes in the Source/common folder, if you need it.

Once LE fixes this, I'll remove this attachment, since it'll be obsolete.
You do not have the required permissions to view the files attached to this post.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Misc.cpp errors

Post by Zcoretri » Mon May 25, 2009 12:02 pm

This is fixed, you just might have to wait for it to be pushed to the public SVN

Or we do what JA says :)

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: Misc.cpp errors

Post by LethalEncounter » Mon May 25, 2009 12:12 pm

Someone checked in some code with conflicts in it :P

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Misc.cpp errors

Post by John Adams » Mon May 25, 2009 12:30 pm

That's what I thought too, LE. Bion checked something in that day for ItemCRC's, and that's the block that's messed up... but, it's not messed up on our Dev SVN - only the public. And we do not have access to check stuff in to Public, far as I know.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests