y-lohse / inkjs

A javascript port of inkle's ink scripting language.
http://www.inklestudios.com/ink/
MIT License
509 stars 104 forks source link

loading from json instead on from ink breaks the external function binding #1082

Open DrAlta opened 2 months ago

DrAlta commented 2 months ago

Describe the bug

the value return in a now some type of object, it can't be converted into a Value

Environment

Additional context

I've inherited the code base after the previous programmer left. and ink.js docs don't really documenting it more than saying, "It's a port of ink! you're an expert, right? in the original and in porting C# to js so you can figure it out."

smwhr commented 1 month ago

Can you provide a reproducible sample of code showing the problem ?

DrAlta commented 1 month ago

Sorry it took so long to get back to you, been crunching at work.

Here's the RPG maker MV plugin. I added the original version of the code I changed in a comment It's just the build and construct method of the InkFactory class

NG_InkManager.zip

InkScene.setupScene("knot")

then does a loop call InkScene.next() until InkScene.isDone() is true

If I understood the code enough to make MRE I could probably fix it myself