PigPen-divinity
Sorceror
Sorry but I have a brain f**t happening.
Can anyone see why this snip of code . .
. . is giving me this error?
Thank you
Can anyone see why this snip of code . .
Code:
public static int GetArtifactChance( Mobile boss )
{
if ( !Core.AOS )
return 0;
int luck = LootPack.GetLuckChanceForKiller( boss );
int chance;
if (boss is DemonKnight)
{
switch ( Utility.Random( 5 ) )
{
case 0: chance = 1000 + (luck); break;
case 1: chance = 1000 + (luck - 10); break;
case 2: chance = 1000 + (luck - 30); break;
case 3: chance = 1000 + (luck - 50); break;
case 4: chance = 1000 + (luck - 70); break;
}
}
else
{
chance = 5500 + (luck / 10);
}
//Line 151 follows:
return chance;
}
. . is giving me this error?
Code:
Errors:
+ Customs/Various NPC/Elven/Elven Drow/DF Gate Keeper/DemonKnight.cs:
CS0165: Line 151: Use of unassigned local variable 'chance'
Thank you