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

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2014, 07:18 PM
Traul
Hill Giant
 
Join Date: Jun 2005
Posts: 105
Default Problem with some custom code (Paging Zaela)

So I tried to patch in Zaela's fix for others being able to see the Monk Epic graphic (found here) but I've come into a little snag. I made the exact changes that she said (but replaced ids and what not) as well as inserted this into client.h:

Code:
bool    MonkEpicEquipped() const;
But when I compile I get

Error 142 error C2601: 'Client::MonkEpicEquipped' : local function definitions are illegal C:\EQ\Source\zone\client.cpp 1903 1 zone
And
821 IntelliSense: member function "Client::MonkEpicEquipped" may not be redeclared outside its class c:\eq\source\zone\client.cpp 1902 14 zone

Referring to:
Code:
bool Client::MonkEpicEquipped() const
{
	if (GetClass() == MONK)
	{
		ItemInst* inst = GetInv().GetItem(12);
		if (inst && inst->GetItem()->ID == 10652)
			return true;
	}
	return false;
}
What did I do wrong exactly??
Reply With Quote
  #2  
Old 10-07-2014, 07:33 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Did you declare inside of Client? Or is it in file scope?

You should declare somewhere between here and line 1210 (before 'protected:')
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #3  
Old 10-07-2014, 08:19 PM
Traul
Hill Giant
 
Join Date: Jun 2005
Posts: 105
Default

Quote:
Originally Posted by Uleat View Post
Did you declare inside of Client? Or is it in file scope?

You should declare somewhere between here and line 1210 (before 'protected:')
I have it placed in between line 227 and 228 on that link
Reply With Quote
  #4  
Old 10-07-2014, 09:17 PM
scrubtasticx's Avatar
scrubtasticx
Sarnak
 
Join Date: Apr 2014
Location: Florida
Posts: 44
Default

sounds like there is a error in the definition of it.
Reply With Quote
  #5  
Old 10-07-2014, 09:18 PM
jdoran
Hill Giant
 
Join Date: Jul 2012
Posts: 212
Default

Hmm. 'redeclared' Search your project for another usage of that string.
Reply With Quote
  #6  
Old 10-07-2014, 09:30 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Quote:
Originally Posted by Traul View Post
local function definitions are illegal
Sounds like this error would only come up if you're trying to define a function in the body of another function. Misplaced '}' somewhere in the client.cpp part, probably.
edit: would explain why it complains about it being a redefinition too, different scope.
Reply With Quote
  #7  
Old 10-07-2014, 09:51 PM
Traul
Hill Giant
 
Join Date: Jun 2005
Posts: 105
Default

Quote:
Originally Posted by Zaela_S View Post
Sounds like this error would only come up if you're trying to define a function in the body of another function. Misplaced '}' somewhere in the client.cpp part, probably.
edit: would explain why it complains about it being a redefinition too, different scope.
God I'm dumb, this was exactly it. Works perfectly now, thanks for the great fix!
Reply With Quote
  #8  
Old 10-08-2014, 12:17 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Zaela definitely beat me to it :P

I put the declaration and definition in a clean repo and hit build..then laid down for a few hours... (it came up good)
__________________
Uleat of Bertoxxulous

Compilin' Dirty
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 12:57 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3