Panthera

Member
I know alot of you will say they are not to worry about. But as an OCD person, having warnings really bother me.

Warnings:
+ Custom/Added31024/GraniteFurnessAddon.cs:
CS0105: Line 2: The using directive for 'System' appeared previously in this namespace
CS0162: Line 355: Unreachable code detected
+ Custom/Added31024/Admin_Tools-main/Admin_Tools-main/Admin Tools/Admin Tools/SOSGump.cs:
CS0108: Line 27: 'SOSGump.User' hides inherited member 'BaseGump.User'. Use the new keyword if hiding was intended.
+ Custom/Added31024/Admin_Tools-main/Admin_Tools-main/Admin Tools/Admin Tools/AdminToken.cs:
CS0108: Line 200: 'AdminToken.InternalTimer.Delay' hides inherited member 'Timer.Delay'. Use the new keyword if hiding was intended.
+ Custom/Added31024/christmas quests/Santa Claus Reindeer Quest/Mobiles/SantaClaus.cs:
CS0114: Line 25: 'SantaClaus.IsInvulnerable' hides inherited member 'BaseCreature.IsInvulnerable'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
+ Custom/Added31024/Xanthos Auction edited for Servuo/Auction System/AuctionItem.cs:
CS0219: Line 464: The variable 'number' is assigned but its value is never used
+ Custom/Added 31624/Christmas Event 2023/Winter Event Mobiles/WintertideKing.cs:
CS0219: Line 143: The variable 'particles' is assigned but its value is never used
CS0219: Line 144: The variable 'particleSpeed' is assigned but its value is never used
CS0219: Line 145: The variable 'particleDuration' is assigned but its value is never used
CS0219: Line 146: The variable 'particleLayer' is assigned but its value is never used
+ Custom/Added 31624/Decorator System/AutoDecoratorr.cs:
CS0219: Line 159: The variable 'FoundSeason' is assigned but its value is never used
CS0219: Line 160: The variable 'IsCurrentSeason' is assigned but its value is never used
+ Custom/Added31024/IDOCDetectorGump.cs:
CS0168: Line 16: The variable 'm_From' is declared but never used
+ Custom/CTF_and_DD_Games/GameJoinGump.cs:
CS0162: Line 58: Unreachable code detected
+ Custom/Added31024/SawmillAddon.cs:
CS0162: Line 289: Unreachable code detected
+ Custom/Added31024/WickedWitch/WickedWitch.cs:
CS0168: Line 158: The variable 'WitchesNewt' is declared but never used
+ Custom/Halloween Event/Scripts/Halloween 06-07/Grim Reaper/GrimReaper.cs:
CS0162: Line 174: Unreachable code detected
CS0162: Line 175: Unreachable code detected
CS0162: Line 176: Unreachable code detected
CS0162: Line 177: Unreachable code detected
CS0162: Line 178: Unreachable code detected
+ Custom/Trick Or Treat NPC/Mobiles/TrickOrTreatNPCEast.cs:
CS0162: Line 189: Unreachable code detected
+ Custom/Trick Or Treat NPC/Mobiles/TrickOrTreatNPCSouth.cs:
CS0162: Line 189: Unreachable code detected
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeWildfire.cs:
CS0169: Line 67: The field 'PetDyeWildfire.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeCrimson.cs:
CS0169: Line 67: The field 'PetDyeCrimson.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeGlacial.cs:
CS0169: Line 67: The field 'PetDyeGlacial.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyePlum.cs:
CS0169: Line 67: The field 'PetDyePlum.PetDyeTarget.m_Owner' is never used
+ Custom/Added31024/Invasion System/InvasionMainGump.cs:
CS0169: Line 16: The field 'InvasionMainGump._mStartTimer' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeHunterG.cs:
CS0169: Line 67: The field 'PetDyeHunterG.PetDyeTarget.m_Owner' is never used
+ Custom/CTF_and_DD_Games/CTFGame.cs:
CS0169: Line 156: The field 'CTFGame.m_Timer' is never used
CS0169: Line 717: The field 'CTFGame.ScoreTimer.m_Mobi' is never used
CS0169: Line 19: The field 'CTFGame.m_Game2' is never used
+ Custom/Added31024/HalloweenItems/AppleBobbingBarrel.cs:
CS0169: Line 12: The field 'AppleBobbinBarrel.m_Timer' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeGold.cs:
CS0169: Line 67: The field 'PetDyeGold.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeFreshRose.cs:
CS0169: Line 67: The field 'PetDyeFreshRose.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeFadedBronze.cs:
CS0169: Line 67: The field 'PetDyeFadedBronze.PetDyeTarget.m_Owner' is never used
+ Custom/Christmas Evil Reindeer Quest/LimitedStocking.cs:
CS0169: Line 12: The field 'LimitedStocking.m_Timer' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeDusk.cs:
CS0169: Line 67: The field 'PetDyeDusk.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeFadedRose.cs:
CS0169: Line 67: The field 'PetDyeFadedRose.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeEmerald.cs:
CS0169: Line 67: The field 'PetDyeEmerald.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeMarble.cs:
CS0169: Line 67: The field 'PetDyeMarble.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyePowdersnow.cs:
CS0169: Line 67: The field 'PetDyePowdersnow.PetDyeTarget.m_Owner' is never used
+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeFineWine.cs:
CS0169: Line 67: The field 'PetDyeFineWine.PetDyeTarget.m_Owner' is never used
+ Custom/Added31024/Invasion System/Invasion System.cs:
CS0414: Line 34: The field 'TownInvasion._AlwaysMurderer' is assigned but its value is never used
 
Ok for example: This one is throwing a warning in my above post.

+ Custom/Added 31624/Season of the Witch/Pet Dyes/PetDyeDusk.cs:
CS0169: Line 67: The field 'PetDyeDusk.PetDyeTarget.m_Owner' is never used

using Server.Targeting;
using System;
using Server;
using Server.Gumps;
using Server.Network;
using Server.Menus;
using Server.Menus.Questions;
using Server.Mobiles;
using System.Collections;

namespace Server.Items
{
public class PetDyeDusk : Item
{
[Constructable]
public PetDyeDusk() : base( 0x1005 )
{
Weight = 1.0;
Movable = true;
Hue = 2052;
Name="rare pet dye";
}

public PetDyeDusk( Serial serial ) : base( serial )
{
}

public override void OnDoubleClick( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
}
else if( from.InRange( this.GetWorldLocation(), 1 ) )
{
from.SendMessage( "Which pet would you like to use this dye on?" );
from.Target = new PetDyeTarget( this );
}
else
{
from.SendLocalizedMessage( 500446 ); // That is too far away.
}
}

public override void AddNameProperties(ObjectPropertyList list)
{
base.AddNameProperties(list);
{
list.Add("Color: Dusk"); // recovered from a shipwreck
}
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}

private class PetDyeTarget : Target
{
private Mobile m_Owner;
private Item m_Dye;

public PetDyeTarget( Item dye ) : base ( 10, false, TargetFlags.None )
{
m_Dye = dye;
}

protected override void OnTarget( Mobile from, object target )
{
if ( target == from )
from.SendMessage( "You cant dye yourself!" );

else if ( target is PlayerMobile )
from.SendMessage( "You cannon dye a player with this!" );

else if ( target is Item )
from.SendMessage( "You can only dye creatures with this." );

else if ( target is BaseCreature )
{
BaseCreature c = (BaseCreature)target;

if ( c.BodyValue == 400 || c.BodyValue == 401 && c.Controlled == false )
{
from.SendMessage( "You cannont dye a human!" );
}
else if ( c.ControlMaster != from && c.Controlled == false )
{
from.SendMessage( "You can only dye a pet you own." );
}
else if ( c.Summoned )
{
from.SendMessage( "You cannot use this on summoned creatures." );
}
else if ( c.Controlled == true && c.ControlMaster == from)
{
c.Hue = m_Dye.Hue;
from.SendMessage( "You dye your pet." );
from.PlaySound( 0x23E );
m_Dye.Delete();
}
}
}
}
}
}
 
Code:
Line 67: The field 'PetDyeDusk.PetDyeTarget.m_Owner' is never used
Means you set a field and never used it, so m_Owner just needs to be removed as it is not used in the script!
Code:
private class PetDyeTarget : Target
{
private Mobile m_Owner;
private Item m_Dye;

to
Code:
private class PetDyeTarget : Target
{
private Item m_Dye;

Each error/warning gives you the offending script name and line number where the issue is, if you use VS which you should be, these warnings should be highlighted, specially the unreachable code will looked washed out where it happens in color. None the less, mainly your warnings are do to sloppy code left by the creators of those systems.
 
Ok Thank you. Holy Cow!! I didnt know that was you until I seen your signature. I remember you from RunUO.

Ok with your advice I got it down to just these warnings. Visual Studio isn't showing any errors on these scripts. But also, I have never run visual studio before even though it's on my comp for my developer to use. But I wanted to just clean up the errors. You have to admit, it's a lot shorter list then it was. So, thank you so much for that. Some of my fixes threw errors so I did have to revert a few back.

Warnings:
+ Custom/Added31024/Admin_Tools-main/Admin_Tools-main/Admin Tools/Admin Tools/SOSGump.cs:
CS0108: Line 27: 'SOSGump.User' hides inherited member 'BaseGump.User'. Use the new keyword if hiding was intended.
+ Custom/Added31024/Admin_Tools-main/Admin_Tools-main/Admin Tools/Admin Tools/AdminToken.cs:
CS0108: Line 200: 'AdminToken.InternalTimer.Delay' hides inherited member 'Timer.Delay'. Use the new keyword if hiding was intended.
+ Custom/Added31024/christmas quests/Santa Claus Reindeer Quest/Mobiles/SantaClaus.cs:
CS0114: Line 25: 'SantaClaus.IsInvulnerable' hides inherited member 'BaseCreature.IsInvulnerable'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
+ Custom/Added31024/Xanthos Auction edited for Servuo/Auction System/AuctionItem.cs:
CS0219: Line 464: The variable 'number' is assigned but its value is never used
+ Custom/CTF_and_DD_Games/GameJoinGump.cs:
CS0162: Line 58: Unreachable code detected
+ Custom/Added31024/WickedWitch/WickedWitch.cs:
CS0168: Line 158: The variable 'WitchesNewt' is declared but never used
+ Custom/Halloween Event/Scripts/Halloween 06-07/Grim Reaper/GrimReaper.cs:
CS0162: Line 174: Unreachable code detected
CS0162: Line 175: Unreachable code detected
CS0162: Line 176: Unreachable code detected
CS0162: Line 177: Unreachable code detected
CS0162: Line 178: Unreachable code detected
+ Custom/Added31024/Invasion System/InvasionMainGump.cs:
CS0169: Line 16: The field 'InvasionMainGump._mStartTimer' is never used
+ Custom/CTF_and_DD_Games/CTFGame.cs:
CS0169: Line 156: The field 'CTFGame.m_Timer' is never used
CS0169: Line 717: The field 'CTFGame.ScoreTimer.m_Mobi' is never used
CS0169: Line 19: The field 'CTFGame.m_Game2' is never used
+ Custom/Added31024/HalloweenItems/AppleBobbingBarrel.cs:
CS0169: Line 12: The field 'AppleBobbinBarrel.m_Timer' is never used
+ Custom/Christmas Evil Reindeer Quest/LimitedStocking.cs:
CS0169: Line 12: The field 'LimitedStocking.m_Timer' is never used
+ Custom/Added31024/Invasion System/Invasion System.cs:
CS0414: Line 34: The field 'TownInvasion._AlwaysMurderer' is assigned but its value is never used
 
Last edited:

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back