inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
4.07k stars 489 forks source link

Adding null check to value pop #781

Open aravol opened 2 years ago

aravol commented 2 years ago

When an external function opens a flow, the return from that function is never acknowledged and the function is called a second time when returning to the original flow, however the arguments are all NullValues which causes a nullref. This fixes the nullref, albeit more work will be needed to address the double call of a function that opens a flow.

Noting that the alternative of creating a call stack to call after the function block is done also doesn't work, since the story will continue with the next paragraph, resulting in a rather weird requirement of calling a function just before the last block to be shown.