Defining fallback functions for testing in Ink Editor #890
-
Hello, I'm creating Ink files for my dialogue mechanic in Unity. I'm also implementing external functions for the game engine to deal with these, however in the Ink Editor I cannot get past this error: It's an external function that works with C# and the game engine. The 2 errors are: My code looks like this:
I'd appreciate any kind of advice! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
These two don't match parameters; also the external function def is supposed to name parameters (the parameters aren't used by ink, so it's just a way of telling the compiler how many to expect, but still - you can't use "true"). So
should be
You're also going to need your ink fallback for "getTestBool" to return something, or you'll hit an error when inky tries to use it.
Note I quite often use "return RANDOM(0,1)" for this kind of fallback, so I can test different paths, but your use-case might not want that. |
Beta Was this translation helpful? Give feedback.
These two don't match parameters; also the external function def is supposed to name parameters (the parameters aren't used by ink, so it's just a way of telling the compiler how many to expect, but still - you can't use "true").
So
should be
You're also going to need your ink fallback for "getTestBool" to return something, or you'll hit an error when inky tries to use it.
Note I quite often use "return RANDOM(0,1)" for this kind of fallback, so I can test different paths, but your u…