Im making an API call to openai, then parse the response using server script.
It seems that the parsing is working well, but the data isn’t affecting the thing I want to change.
I’ts like the change is taking place before the parse is done.
I added values from the server script in the “change thing” to make sure it waits for it, but it did not help…
I’ll appreciate any advice.
Yes
That is the first thing to try but might not work for this use case
Try adding the parsing to a custom event and return the data from that event (being the parsed values) so step 3 becomes ‘trigger custom event for parsing’ (which is just the parsing action in the custom event).
Thanks @boston85719.
I ended up changing the script to async, and it works.
I guess there is an “await” or a “.then” callback that needed that async definition.
1 Like