-
May 20th, 2021, 09:07 #11
- Join Date
- Apr 2018
- Posts
- 51
So I recently learned about Debug.chat() and Debug.console() that can be used instead of print() that gives different information about variables and what is in them. I was constantly getting blank lines for variables that obviously had information in them, but when I switched from print() to Debug.chat() I was able to see what was in them.
-
May 20th, 2021, 20:24 #12
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
The print function purely outputs a string; so it doesn't know anything about the different variable types in Fantasy Grounds Lua. (And it's the oldest debug function from before my time.)
The Debug.chat and Debug.console functions are designed to accept any number of parameters, and attempt to output some information on every object type passed as a parameter.
Also, Debug.printStack will output the current Lua stack at the time the function is called. Useful for figuring out how a particular script function is getting called.
Regards,
JPG
-
May 24th, 2021, 05:23 #13
-
May 24th, 2021, 05:33 #14
Ahem... the Moon Wizard is not the AI driven Trenloe.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks