fix formatting in OnEvent.
Add support for AdiDebug.
Fix for AdiDebug output containing non-formatted strings.

This adds a function called GetFormattedString that is basically Printf but returns string instead of printing it.
Revert "Fix for AdiDebug output containing non-formatted strings."

This reverts commit a1d052275b0aaf209ce48cb2a456e98ac5266f26.
Revert "Add support for AdiDebug."

This reverts commit b48ab4e2613a8634b892d046d949647e0c2f3288.
Remove pointless equality check for true in if statement.
Add GetFormattedString function. Add support for AdiDebug.
Make Print use GetFormattedString
Remove TODO comment that referenced last commit