TScript.DebugMode

From Soldat Community Wiki
Jump to: navigation, search
property DebugMode: Boolean
 Access mode: R

Description

TRUE if debug mode is ON.
This can be changed in ScriptCore3_config_file
This feature is, as the name says, very useful when debugging or developing script.

Example

Config.ini :

[Config]
Name = Example
MainFile = example.pas
Sandboxed = 2
Debug = 1

example.pas :

procedure Debug(Msg: string);
begin
  if Script.DebugMode then
    WriteLn('['+Script.Name+'] '+Msg);
end;

begin
  Debug('Server has started');
end.