External Function with 5 parameters
Hello Everyone, I use a lot of External Functions in my ink code, without problems. But the last one I defined, has 5 parameters... And I don't know if that is a problem, but it doesn't work.
Here is my C# definition: OBJECT.story.BindExternalFunction("EvaluarSkill", (string accionaevaluar, string personaje, int dificultad, string versus, string tipo) => { return EvaluarSkill(accionaevaluar, personaje, dificultad, versus, tipo); });
The C# error that I get is: "the delegate 'Func
The C# function EvaluarSkill has 5 parameters, that is not the problem, and the EXTERNAL definition in ink has also 5 parameters
I have 20 EXTERNAL functions defined in the same way and all others work, except this one.
Can Anyone help me?
Thanks a lot!
Re-reading the documentation it seems that I need to use BindExternalFunctionGeneral instead of BindExternalFunction, if I need this number of parameters. Anyone has an example on how to use it? I don't understand how to pass this "object array" from Ink to Unity. If anyone has an example on how to define and call the function in Ink, and how to declare it in Unity, it will be very helpful. Thanks a lot!
Solved! got help from a friend with better C# skills that mine.
I did this: (in case it is helpful to somebody else) ThisRun.RunCars[ThisRun.CurrentCar].story.BindExternalFunctionGeneral("EvaluarSkill", (object[] parametros) => { return EvaluarSkill(parametros[0].ToString(), parametros[1].ToString(), (int) parametros[2], parametros[3].ToString(), parametros[4].ToString()); });
On ink side it works in the same way of traditional external functions, no need to change the code
I am worried that this forum has little movements and sometimes nobody answers community questions. That harms the potential growth of Ink engine, as there is little documentation, and no other place where to find resources. Maybe you should set up a small fee to get help or some way to support the developers who are getting into Ink and need help.
I believe also that the problem of pure external functions is something that really needs to change, but that is my vision. Parsing parameters from the text or using tags is messy. Regards!
Hello I have the exact issue as you, but I am struggling to understand your solution. I get these two errors.

Hello I have the exact issue as you, but I am struggling to understand your solution. I get these two errors.
Can you copy the code you are trying to do ? On one side, the ink function you are trying to bind, and on the other side, how you are trying to bind it in C#?
Are you sure that's good to reactivate a thread from two years ago, and of another ink version?