Closed hsandt closed 7 months ago
I do not think it's possible to bind to error in js, but I never tried it. You should definitively post the question on the inkjs repo: https://github.com/y-lohse/inkjs
Your were almost there. inkjs expects story.onError to be a function be it doesn't pre-exist. You just have to define it. Replace your
story.onError += (msg, type) => {
with
story.onError = (msg, type) => {
@hsandt Right after posting this, I noticed you already got an answer on the inkjs issue, sorry. Maybe you could close this one?
The doc says how to bind onError in C#:
https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md
but not in Javascript. I tried to modify main.js to display the error directly on the page:
but I got:
Maybe there is no binding in JS, only C#? But then why the console log error message in browser?