1lytics

Interactive functions

Interactive functions allows Lua scripts to interact with user - show messages (for debugging etc).

  • gkMessageBox - displays message box with specified text
  • gkFunctionInfo - displays message box with short info about taken function

gkMessageBox

The gkMessageBox function displays message box with specified text.

gkMessageBox(Level, 'Message text')

Parameters

  • Level - message level (0-4), sets message box caption and icon. You also can use string identifiers for message level, in either upper or lower case:
    • 0, 'message', 'msg' - Message
    • 1, 'information', 'info' - Information
    • 2, 'notice' - Notice
    • 3, 'warning', 'warn' - Warning
    • 4, 'error', 'err' - Error
  • Message text - message text to be displayed.

Usage sample

-- display an error message
gkMessageBox('err', 'Somethig wrong')
y = 3
-- watch the variable 'y'
gkMessageBox(0, 'y = ' .. y)

gkFunctionInfo

The gkFunctionInfo function displays message box with short info about taken function.

gkFunctionInfo('FunctionName')

Parameters

  • FunctionName - function name for which information to be displayed.

Usage sample

-- displays short info about itself
gkFunctionInfo('gkFunctionInfo')