Dispenser.IsValid
Skip to content
mnscript
bool Dispenser.IsValid() 

Description ​

Gets whether the Dispenser is valid.

Returns ​

bool - True if the Dispenser is valid.

Example ​

msc
using Peripheral;
using Application;

Dispenser dispenser = Peripheral.GetConnectedDispenser();

if(dispenser.IsValid() == false){
    // If the dispenser was not connected to the terminal, quit.
    Application.Exit();
}