Create a new group of WEB support operators.

 

Syntax

function mCreateWebSupportGroup(sName: string): integer;

 

Parameters and return values

Parameter

Type

Value

sName

string

group name

 
Function result

>0

 function executed successfully; result — numeric ID of created group;

-1

group name can't be empty or consist of spaces;

-2

such group name already exists in the database. The letter case does not matter.

 

Example


const
  GROUP_NAME = 'MyChat Web Support';
var
  iID: integer;
  s: string;
begin
  iID := mCreateWebSupportGroup(GROUP_NAME);
    case iID of
      -1: s := 'Group name is empty!';   
      -2: s := 'Group with name "' + GROUP_NAME + '" already exists!';   
      else s := 'Group created!';
    end;
    
  mLogScript(s, '');  
end.


Script work result

[16:05:14] (Log "mCreateWebSupportGroup"): Group with name "MyChat Web Support" already exists!

[16:05:14] (Run "mCreateWebSupportGroup"): Script operation time: 8 ms

[16:05:14] (Run "mCreateWebSupportGroup"): Script done successfully.


See also

mLogScript