Function to create new users group.

 

Syntax

function mCreateUsersGroup(sGroupName: string): integer;

 

Parameters and return values

Parameter

Type

Value

sGroupName

string

users group name. The letter case is important.

 

Function result

An integer is the internal index of created group. If the function returns "-1" then such group already exists.

 

Example

var
  i: integer;
  s: string;
begin
  for i := 1 to 5 do begin
    s := 'Group-' + IntToStr(i);
    mCreateUsersGroup(s);
  end;
end.

Script work result

Creating user groups in MyChat by the script

 

See also

IntToStr

mDeleteUsersGroup