- 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:
My error is with the GetGainChance. Its throwing the following:
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!
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: