mnscript
bool System.IsServer()
Description ​
Returns whether the system is a server.
Returns ​
bool
- True if the system is a server.
Example ​
msc
using System;
// If you're running on a server, certain things such as UI will cause your program to crash.
bool isServer = System.IsServer();
function CreateUI(){
// UI stuff here.
}
if(isServer){
// UI only works on terminals, so we can use IsServer to prevent our programs creating UI on servers.
CreateUI();
}