Skip to content

inky playback fails if you call an external function without a fallback #532

Open

Description

@joningold

The following source causes an immediate, silent "End of Story"; it should produce a "no fallback exists!" error or equivalent.

~ functionCall ()

EXTERNAL functionCall ()

Activity

  1. jakesee commented on Jun 27, 2025

    @jakesee

    Given the following Ink, I expect Inky to print "We are in the start knot", but it produces "End of Story" immediately when it reaches ~ listen(...).

    Does this mean we cannot use Inky to write and test when EXTERNAL functions are used?

    EXTERNAL listen(knot_name, event)
    
    ~ listen("encounter_win", "win_event")
    
    -> start
    
    === start ===
    We are in the start knot
    --> END
    
  2. joningold commented on Jun 27, 2025

    @joningold
    MemberAuthor

    Given the following Ink, I expect Inky to print "We are in the start knot", but it produces "End of Story" immediately when it reaches ~ listen(...).

    Does this mean we cannot use Inky to write and test when EXTERNAL functions are used?

    You can. But you need to define a fallback - an inky-only version of the function (which might replicate that functions behaviour, or do nothing, depending on your needs). However, ink should report if there isn't one, rather than failing without a report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions