Debugging, Mac os x, Windows – Expert Sleepers MIDI & OSC Scripting v1.1.0 User Manual

Page 13

Advertising
background image

minorVersion

dotVersion

version

The plug-in’s version number is of the form x.y.z (e.g. 2.1.4) where x is the major version
number, y is the minor version number, and z is the dot version. The ‘version’ global vari-
able contains a single value combining all three e.g. for version 2.1.4, ‘version’ is 20104.
This is useful for making your scripts backwardly compatible - by testing for the version
number and not trying to use features that were not present in a version of the plug-in
older than the version you’re testing for.

Debugging

You can use Lua’s ‘print’ function to write out information to help you track what’s going
on (or what’s not going on) in your script. Also any run-time errors, or errors in loading
the script in the first place, are reported. In both cases, the output goes to:

Mac OS X

The system console.log. Use the standard Console utility (located in

Applications/

Utilities

) to view it.

Windows

The system OutputDebugString API. Use an application like Sysinternal’s DebugView to
view it.

Advertising