#ok so, how do i fix this code

32 messages · Page 1 of 1 (latest)

sterile aurora
#

What the hell

#

Are u sure this is full script

tepid ocean
#

There seems to be an unnecessary } after "ExceptionRank"

sterile aurora
#

@stiff snow

#

U sure this is full script?

stiff snow
#

no it's not full

tepid ocean
#

Also replace ; with , after each item in the first table

stiff snow
#

return {

{
    GroupName = "Training Command",
    BackGroundColor = Color3.new(0.839216, 0.0509804, 0.0509804),
    DivTag = "Training Command";
    Icon = "12792463010",
    GroupID = {32043390};
    ExceptionRank = {4};
},
{
    GroupName = "SF - Land Forces",
    BackGroundColor = Color3.new(0.129412, 0.129412, 0.129412),
    DivTag = "SF - Land Forces";
    Icon = "13238974464",
    GroupID = {32050657};
    ExceptionRank = {5};
},
{
    GroupName = "SF - Awaiting Ranking",
    BackGroundColor = Color3.new(0.129412, 0.129412, 0.129412),
    DivTag = "SF - Awaiting Ranking";
    Icon = "12792463010",
    GroupID = {32043356};
    ExceptionRank = {1};
},
{
    GroupName = "Army Staff",
    BackGroundColor = Color3.new(1, 0.0588235, 0.0588235),
    DivTag = "Army Staff";
    Icon = "13239041858",
    GroupID = {16124932};
    ExceptionRank = {254};
},

}

 local function getGroupInformation(groupId)
local group = game:GetService("GroupService"):GetGroupInfoAsync(groupId)
for i,v in group.Roles do
    print(v.Name, v.Rank)
end

end
getGroupInformation(7076400)

sterile aurora
stiff snow
sterile aurora
tepid ocean
#

I think your code returns before it gets to that part.

sterile aurora
#

Wait

#

Yea

#

That looks bit understoodable

stiff snow
#

so what do i do

coral swiftBOT
#

studio** You are now Level 1! **studio

molten fiber
#

Put the return at the end

tepid ocean
#

Move this to be above

#

local function getGroupInformation(groupId) local group = game:GetService("GroupService"):GetGroupInfoAsync(groupId) for i,v in group.Roles do print(v.Name, v.Rank) end end getGroupInformation(7076400)

#

Above the return

stiff snow
#

sec

#

aight

#

thanks man

tepid ocean
#

👍

coral swiftBOT
#

studio** You are now Level 1! **studio

glacial robin
#

groupId is in brackets

glacial robin
coral swiftBOT
#

studio** You are now Level 3! **studio

glacial robin
#

(but why would you do that)

#
local function Instance_Group(...)
  local Args = {...}
  local Object = {
    GroupName;
    BackgroundColor3;
    DivisionTag;
    Icon;
    GroupID;
    ExceptionRank;
  };
  Object = setmetatable(Args,getmetatable(Object));
  return Object;
end

Group_Manager = {};

Group_Manager.Army_Staff = Instance_Group({
  "Army Staff",
  Color3.new(1,0.0588,0.0588),
  "Army Staff",
  13239041858, -- needs to be an Integer type not a String type 
  16124932,
  254
});

print(Group_Manager.Army_Staff);

local function GetGroupInfo(groupId)
  local GroupAsync = game:GetService("GroupService"):GetGroupInfoAsync(groupId);
  for _,Role in pairs(GroupAsync.Roles) do 
    print(Role.Name,Role.Rank);
  end
end
GetGroupInfo(Group_Manager.Army_Staff.GroupID);