Title: What am I missing here? Calling private fncs... Post by: jeffro on 2010 November 03, 14:24:23 I've been reviewing the code for the awesome.dll. I've noticed a number of calls to 'private' functions within the gameplay.systems dll.
When I try accessing a private function in my own dll, I get a 'does not contain a definition for'. Short of setting those fncs to public, how are these private members accessed? Is it a C# Studio setting I'm missing. I'm using the 3.5 platform. For instance, MartialArts.GetScoreForMartialArtist. This is a privately declared fnc. I can't compile if I try calling it. Any help? Thanks. Title: Re: What am I missing here? Calling private fncs... Post by: J. M. Pescado on 2010 November 03, 16:06:30 AwesomeMod is written with MSIL and is not required to adhere to encapsulation rules, as MSIL ignores all of these things. It also explodes spectacularly when misused. As mentioned in another thread, the code we deal in looks a lot like this:
Code: L_0000: ldarg.0 Title: Re: What am I missing here? Calling private fncs... Post by: jeffro on 2010 November 03, 16:32:31 Driving home this morning I was wondering if I were to make my calls and references to the private stuff from Reflector, instead of C# studio, if I might circumvent the problem, being just the Microsoft compiler complaining at me.
Sounds like it from what you're saying. Thank you Mr. Awesome. I'll give that a shot. edit: on second thought, once I make the call using Reflector, I won't ever be able to compile in C# studio again without commenting stuff out. hmm... Title: Re: What am I missing here? Calling private fncs... Post by: jeffro on 2010 November 03, 18:17:58 I just loaded Reflexil 1.1.
It allows changing constants as well as functions to public. So I'll just go that route until the game throws up on it. Hopefully it won't. |