Console module

Module for interacting with the developer console.

Functions

  • trx.console.log("string1", "string2", ...)

    trx.console.log.generic(level, ...)

    trx.console.log.info(...)

    trx.console.log.error(...)

    trx.console.log.warn(...)

    trx.console.log.warning(...)

    trx.console.log.debug(...)

    Logs a line to the developer console with a specific level.

  • trx.console.eval("string"[, opts])

    Evaluates a given string as a developer console command.

    By default, output from commands is silenced and only appears in the terminal and the log file. To see output from the commands normally, pass { verbose = true } in opts.

    Example:

    trx.console.eval("play 1", { verbose = true })
    

    will play the first level and show an according message in the console log.

  • trx.console.clear()

    Clears the console.