-
August 3rd, 2022, 14:26 #1
Debug.chat not working in named-script onInit function
I just noticed while doing some testing that a Debug.chat('test') line in an onInit function of a named script is not showing up in chat.
I'm assuming the chat may not be available when that function is called, or perhaps it's something else.
Here's a little ext to make it easy to replicate.
EDIT: Comm.addChatMessage also seems to be unusable when called from onInit like this.Last edited by bmos; August 3rd, 2022 at 15:06.
bmos' extensions
he/them
-
August 3rd, 2022, 15:38 #2
MeAndUnique shared Interface.onDesktopInit as an alternate approach, so if this is just 'intended behavior' I get it and would suggest it be added to https://fantasygroundsunity.atlassia...6645578/script.
Last edited by bmos; August 3rd, 2022 at 15:45.
bmos' extensions
he/them
-
August 3rd, 2022, 17:41 #3
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,561
If you use Debug.chat in the global scripts, those are actually called before the chat window exists; so there is no chat window to write to. In those scenarios, the application falls back to writing to console log.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks