Stack Overflow Error

I want to edit the admin system SimpleAdmin made by Crywink.

Everytime I run a command, it gives me the error 06:21:39.840 ServerScriptService.Server.Core.Processor:280: ServerScriptService.SimpleAdmin.Loader.MainModule.Server.Dependencies.Commands:2341: stack overflow - Server - Processor:2801

So far I have tried looking on the DevForum, however nothing helped. I tried using task.delay() and task.defer() but still did nothing.

All I did was add two new roles (Security, Instructor) and changed the “Owners” role to “HighCommand” as seen in the image below.
image

I also changed all command role levels to fit with their usage (Warn with mods, ban with admin, etc). I also added four new commands (killonsight,unkillonsight,authorize,unauthorize) as seen in the snippet below.

Command Code Snippet
{
			Name = "authorize";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"auth"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};
			Run = function(plr, args)
				Commands.Get("authorize").Run(plr, args);
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.Text = plr.Name.."(AUTHORIZED)"
			end;
		},
		{
			Name = "unauthorize";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"unauth"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};
			Run = function(plr, args)
				Commands.Get("authorize").Run(plr, args);
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.Text = plr.Name
			end;
		},
		{
			Name = "killonsight";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"kos"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};
			Run = function(plr, args)
				Commands.Get("authorize").Run(plr, args);
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.Text = plr.Name.."(KILL ON SIGHT)"
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.TextColor3 = Color3.new(1, 0, 0.0156863)
			end;
		},
		{
			Name = "unkillonsight";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"unkos"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};

Any and all help is welcome.

This is because the authorize command runs itself.

1 Like

Hm, that’s odd. All the other commands are formatted the same way. How would I stop this from happening?

I’m pretty sure this is your problem:

Try changing that to Commands.Get(“unauthorize”)… and tell me what happens.

Actually, that looks to be one of many potential problems, one moment.

1 Like

Try changing it to this:

{
			Name = "authorize";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"auth"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};
			Run = function(plr, args)
				--Commands.Get("authorize").Run(plr, args);
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.Text = plr.Name.."(AUTHORIZED)"
			end;
		},
		{
			Name = "unauthorize";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"unauth"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};
			Run = function(plr, args)
				--Commands.Get("authorize").Run(plr, args);
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.Text = plr.Name
			end;
		},
		{
			Name = "killonsight";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"kos"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};
			Run = function(plr, args)
				--Commands.Get("authorize").Run(plr, args);
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.Text = plr.Name.."(KILL ON SIGHT)"
				plr.Character:WaitForChild("Head").OverheadUI["Clip 1"]["Clip 2"].PName.TextColor3 = Color3.new(1, 0, 0.0156863)
			end;
		},
		{
			Name = "unkillonsight";
			Level = Levels.Security;
			PermissionNodes = {"MANAGE_CHARACTERS"};
			Aliases = {"unkos"};
			Args = {
				{
					Name = "Target";
					Type = "player";
				},
			};
1 Like

This worked, thank you. Never noticed it saying Commands.Get("authorize").Run(plr,args);.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.