-
Notifications
You must be signed in to change notification settings - Fork 106
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
Calling EvaluateFunction() on functions with multiple arguments crashes #1020
Comments
Your error seems to be unrelated with the number of arguments, but rather with it being called with strings as parameters and ink expecting a list item in the comparaison operator :
Namely, you are writing
where |
how can I call this function from javascript without strings? is there a way to communicate to EvaluateFunction the types of the values I'm passing? |
made the following change: |
I made the following change:
now it works when called from javascript, but when i call get_data() internally from the ink file, i get a similar error. is there a way I can have a function that works both ways? |
Those two discord messages may be helpful to you :
(those answers are for C# but should also work in js/ts) |
Describe the bug
I am attempting to call
when calling this I get the following errors:
using EvaluateFunction() to call other ink functions with fewer args works as expected
the function in question also works when called from inside the ink.
To Reproduce
load the ink file with the following function
assign
window.story = story
in browser inkopen browser console and enter the following:
var rtn = story.EvaluateFunction('get_data', ['pendant', 'description'])
observe error.
Expected behavior
I expect to receive a string value back
Ink files
bug.zip
Environment
Additional context
We intend to use this function to display an inventory, therefore we have designed it to use a series of look ups to produce the correct strings when called for.
The text was updated successfully, but these errors were encountered: