Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pass symbols to EvaluateFunction() #1088

Open
acolchagoff opened this issue Nov 14, 2024 · 0 comments
Open

Unable to pass symbols to EvaluateFunction() #1088

acolchagoff opened this issue Nov 14, 2024 · 0 comments

Comments

@acolchagoff
Copy link

Describe the bug

I have an inventory list in ink that has a corresponding set of metadata functions: print_name and print_desc

To Reproduce

declare the following in ink:

=== function print_name(x)
{x:
    - pendant: Silver Pendant
}

=== function print_desc(x)
{x:
    - pendant: A brilliantly shiny silver pendant depicting the dove of Genos.
}

when running the following:

        const itemName = story.EvaluateFunction('print_name', [Symbol(item)]);
        const itemDescription = story.EvaluateFunction('print_desc', [Symbol(item)])

I get this error: Uncaught (in promise) Error: null

Expected behavior

ItemName and itemDescription will be set to the string values declared in ink

Ink files

N/A see examples above

Environment

  • OS: macOS
  • Web browser version: Latest Firefox
  • inklecate version: N/A we only use inkjs
  • inkjs version: 2.2.2

Additional context

I posted this before: #1020
I was unable to find anything that worked in the discord links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant