• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Is there a "print" function for use in scripts?

Azhrei

Well-known member
I'm trying to write a script to add +2 to all Knowledge checks (whether trained or not). I've found similar code in a different trait and I'm using that code. I think I understand what the original script is doing, but my script doesn't work — it doesn't add anything to the Knowledge skills (or at least, the bonus doesn't show up when I hover over the "?" for a given Knowledge skill on the Skills tab).

I'd like to print some of the intermediate script values so I can ensure they contain what I think they should. (Actually, what I really want to do is set a breakpoint and single-step the code, but I know that isn't going to happen!) Is there any kind of print statement that I can put into the script that will cause the output to appear in a "console" or "log" window?

Thanks!
 
Is there any kind of print statement that I can put into the script that will cause the output to appear in a "console" or "log" window?
Two, in fact!

"debug XYZ" will cause XYZ to appear in the debug log. You'll need to go to the Develop menu and turn on the "Enable File Debugging" option, then you'll find it in Develop -> Floating Info Windows -> Show Debug Output.

"notify XYZ" will cause a popup modal with XYZ to appear at runtime, and is more suited for quick-and-dirty debugging tasks, but has limited space and isn't always helpful when you're dealing with loops.
 
Back
Top