Solved Rust.XP.dll Add method

Discussion in 'Rust Development' started by k1lly0u, Aug 4, 2016.

  1. Is anyone able to post or send me the method 'public void Add(Base source, float Amount = 1f, string Category = null, ulong userid = 0L)' from the Agent class in Rust.Xp.dll?

    My decompiler doesn't like it apparently all I get is this
    Code:
    Current member / type: System.Void Rust.Xp.Agent::Add(Rust.Xp.Earn.Base,System.Single,System.String,System.UInt64)
    File path: C:\Users\k1lly0u\Documents\Visual Studio 2015\Projects\Managed\Rust.Xp.dllProduct version: 2016.2.718.0
    Exception in: System.Void Add(Rust.Xp.Earn.Base,System.Single,System.String,System.UInt64)Two paths with different stack states encountered.
    at .Š.Š( ,  ) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 139
    at .Š.( “, Int32[] Š) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 132
    at .Š.( “, Int32[] Š) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 128
    at .Š.( “, Int32[] Š) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 128
    at .Š.( “, Int32[] Š) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 128
    at .Š.( “, Int32[] Š) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 128
    at .Š.( “, Int32[] Š) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 128
    at .Š.() in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 74
    at .Š.œ(”“ ™, •Ÿ €–) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DefineUseAnalysis\StackUsageAnalysis.cs:line 56
    at ‚–.™“.(MethodBody €–, •Ÿ Ÿ, ILanguage ) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 88
    at ‚–.™“.‹(MethodBody €–, ILanguage ) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\DecompilationPipeline.cs:line 70
    at ‚–..›“(™“ œ“, ILanguage , MethodBody €–, ”“& ™) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 95
    at ‚–..š“(MethodBody €–, ILanguage , ”“& ™,  œ–) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\Extensions.cs:line 58
    at ——.ƒ˜.—(ILanguage , MethodDefinition €,  œ–) in c:\Builds\556\Behemoth\ReleaseBranch Production Build NT\Sources\OpenSource\Cecil.Decompiler\Decompiler\WriterContextServices\BaseWriterContextService.cs:line 117
    
     
  2. Your decompiler isn't the only one complaining about that, sadly.
     
  3. I thought it might be a common problem, I know someone must have it because I'm pretty sure there are hooks in there *cough @Wulf *cough
     
  4. Normally an issue like this is caused when the compiler generates bytecode that does not conform to the spec, and then this "error" is later corrected by the runtime (.net or mono).
    Which decompiler did you use?
    The VisualStudio one might work.
     
  5. I use JustDecompile, I've only seen a handful of methods that won't decompile on it. The VS decompiler worked though, and is actually quite handy to have, thanks :)
     
  6. Yeah, they can't be decompiled because they don't conform to the spec.
    The visual studio one works because it's made by microsoft, and microsoft knows which spec unconformities the .net runtime fixes.
    Kind of ugly, sadly.