"For developers", "Server scripts", "Functions description", "Server core", "mGetServerVersion".

 

The function for getting the full version of MyChat Server as a text string divided by points. Three numbers: major, minor, and build.

 

Syntax

function mGetServerVersion: string;

 

Function result

Text string with numbers divided by points.

 

Example

var
  sVer: string;
begin
  sVer := mGetServerVersion;
  
  mLogScript(sVer, 'Full:');
  mLogScript(Fetch(sVer, '.'), 'Major:');
  mLogScript(Fetch(sVer, '.'), 'Minor:');
  mLogScript(sVer, 'Build:');
end.

Script work result

[19:04:34] (Log "mGetServerVersion"): [Full:] 8.13.0

[19:04:34] (Log "mGetServerVersion"): [Major:] 8

[19:04:34] (Log "mGetServerVersion"): [Minor:] 13

[19:04:34] (Log "mGetServerVersion"): [Build:] 0

[19:04:34] (Run "mGetServerVersion"): Script operation time: 4 ms

[19:04:34] (Run "mGetServerVersion"): Script done successfully.

 

See also

Fetch

mLogScript