Fix index out of range exception on the admin commands (#16478)

This commit is contained in:
Max
2023-05-16 00:24:03 +03:00
committed by GitHub
parent 806f547371
commit cb7984461a
2 changed files with 3 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ namespace Content.Server.Administration.Commands
var entityManager = IoCManager.Resolve<IEntityManager>(); var entityManager = IoCManager.Resolve<IEntityManager>();
var bodySystem = entityManager.System<BodySystem>(); var bodySystem = entityManager.System<BodySystem>();
if (bodySystem.TryCreatePartSlotAndAttach(parentId, args[3], childId)) if (bodySystem.TryCreatePartSlotAndAttach(parentId, args[2], childId))
{ {
shell.WriteLine($@"Added {childId} to {parentId}."); shell.WriteLine($@"Added {childId} to {parentId}.");
} }

View File

@@ -1,4 +1,4 @@
using System.Text; using System.Text;
using Content.Server.Database; using Content.Server.Database;
using Content.Shared.Administration; using Content.Shared.Administration;
using Robust.Server.Player; using Robust.Server.Player;
@@ -26,7 +26,7 @@ public sealed class RoleUnbanCommand : IConsoleCommand
if (!int.TryParse(args[0], out var banId)) if (!int.TryParse(args[0], out var banId))
{ {
shell.WriteLine($"Unable to parse {args[1]} as a ban id integer.\n{Help}"); shell.WriteLine($"Unable to parse {args[0]} as a ban id integer.\n{Help}");
return; return;
} }