I am trying to make custom Kohl's Admin commands. Ones that would send a person to a jail and release them when the jailer decides to release them. However, on line 34 I am getting a error saying that I should have ended the return statement even though I ended the return statement on line 67. Here is my code:
return {
{{'imprison','prison'},{'Put a player in prison.','Kohl String'},2,{'player','string'},function(pl,args) for i = args[2],0,-1 do for _, player in pairs(args[1]) do if player.Team == game.Teams.Imprisoned then return true else player.Team = game.Teams.Imprisoned player.Character.Humanoid.Health = 0 return true end end wait() end end} {{'release','discharge'},{'Remove player from prison.','Kohl String'},2,{'player','string'},function(pl,args)
for i = args[2],0,-1 do
for _, player in pairs(args[1]) do
if player:IsInGroup(4355721) then
if player.Team == game.Teams.Targaryen then
return true
elseif player.Team == game.Teams.Imprisoned then
player.Team = game.Teams.Targaryen
player.Characer.Humanoid.Health = 0
return true
end
elseif player.Team == game.Teams.Imprisoned then
player.Team = game.Teams.Westerosi
player.Character.Humanoid.Health = 0
return true
end
end
wait()
end
end} };

1 comment
It seems you formatted the forum thread post incorrectly but whenever I get an error message like this it can often be a slightly different syntactical error that I've made. Where I forget to close a function call, or a function definition, or even various types of statements. Although these days the error messages are often pretty accurate.