MIST logger alert

From DCS World Wiki - Hoggitworld.com


yourLogger:alert

Added with: Mist 4.2
Description
Alert logs are prefixed with 'ERROR' in DCS.log. Will always be logged and it will create an error message window pausing the simulation similar to a normal lua syntax error.

The special character "$n" value allows for easy concatenation of the alert message. n being a number.

Syntax
nothing yourLogger:alert(string alert , table/multipleValues params )
Valid Input Values:
String must be any valid string entry.

Param can either be a table or multiple values. Entries will always correspond to the $n characters. For example $1 will always be the first table entry or first optional param.

Return value:
nothing
Return example:
Usage Examples:
The following could be an alert you might use.
 local PA = mist.Logger:new('PA1', 2)
 PA:alert("No the $1 zone is for $2 and $3. There is no stopping in the $4 zone. \n The $4 zone has always been for $2 and $3.
There is never stopping in the $1 zone." , 'white', 'loading', 'unloading', 'red')
Notes:
Related Functions
new, setLevel, msg, info, warn, error, alert

Scripting Engine

MIST Root Page