HumanPlayer humanPlayer;
if(args.Length > 0)
{
ulong targetId;
if (!ulong.TryParse(args[0], out targetId))
{
SendReply(player, "/npc_add [TARGETID]");
return;
}
HumanNPCInfo tempInfo;
if (humannpcs.TryGetValue(targetId, out tempInfo)) //Patched... Line 2587
{
SendReply(player, "NPC Already Exists.."); //Updated Line 2589
return;
}
humanPlayer = CreateNPC(player.transform.position, currentRot, "NPC", targetId);
}
// Before
HumanPlayer humanPlayer;
if(args.Length > 0)
{
ulong targetId;
if (!ulong.TryParse(args[0], out targetId))
{
SendReply(player, "/npc_add [TARGETID]");
return;
}
HumanNPCInfo tempInfo;
if (!humannpcs.TryGetValue(targetId, out tempInfo)) // ! wrong. <Current Line 2587
{
SendReply(player, "Couldn't find the NPC"); // Current, wrong error msg Line 2589
return;
}
humanPlayer = CreateNPC(player.transform.position, currentRot, "NPC", targetId);
}Couldn't use the latest version on umod until the chat command npc_add was patched. Posting just in case anyone else had the same issue. Version 0.3.45