ServUO Version
Publish 57
Ultima Expansion
Endless Journey
So I've got a script that is to help players know their chance to gain on certain mobs/craftables. I got it from one of the shard downloads. I'm having trouble with 2 line errors:

C#:
        private static double AverageTimeToGain(Mobile from, Mobile fakeMob, Skill skill, double value)
        {
            skill.BaseFixedPoint = (int)value;
            var chance = GetOptimalSuccessChance(from, fakeMob, skill);
            var successGainChance = SkillCheck.GetGainChance(fakeMob, skill, chance, true);
            var failedGainChance = SkillCheck.GetGainChance(fakeMob, skill, chance, false);
            var avgChance = ChanceBasedAverage(chance, successGainChance, failedGainChance);

            var skillDelay = GetSkillDelay(from, fakeMob, skill);
            var result = 1 / avgChance * skillDelay;
            return result;
        }

My error is with the GetGainChance. Its throwing the following:
C#:
 + 001a Customs/SkillEstimate.cs:
    CS0122: Line 61: 'SkillCheck.GetGainChance(Mobile, Skill, double, double)' is inaccessible due to its protection level
    CS0122: Line 62: 'SkillCheck.GetGainChance(Mobile, Skill, double, double)' is inaccessible due to its protection level

GetGainChance nor SkillCheck are called anywhere else in the script, I have tried changing private static to public static but the same error happens.

I'd love if someone can explain what or where the protection level is coming from so I can further understand the error. Thank you!
 
Last edited:
Its not that AverageTimeToGain's proection level is the issue.

The GetGainChance from the Skillcheck is not accessible.
 
Its not that AverageTimeToGain's proection level is the issue.

The GetGainChance from the Skillcheck is not accessible.
There isnt anywhere else that SkillCheck is called on in the script, so im unsure where it is becoming inaccessible due to protection levels?
 
the function named GetGainChance is probably either protected or private. That is what it is saying
 

Active Shards

Donations

Total amount
$80.00
Goal
$1,000.00
Back