Hello everyone,
I would like to create a function call builder with an ExternalAddress argument.
The FCBCall function generate this message:
[ARGACCES2] Function 'myFunction' expected argument #1 to be of type external address.
It's working with other arguments.
Am i doing something wrong ?
#include "include/clips.h"
#include <stdio.h>
static void myFunction(Environment *env, UDFContext *udfc, UDFValue *out)
{
printf("test");
}
int main()
{
Environment* env = CreateEnvironment();
FunctionCallBuilder* fcb = CreateFunctionCallBuilder(env, 1);
AddUDF(env, "myFunction", "", 1, 1, "e", myFunction, "myFunction", NULL);
CLIPSExternalAddress* externalArgument = CreateCExternalAddress(env, NULL);
FCBAppendCLIPSExternalAddress(fcb, externalArgument);
FCBCall(fcb, "myFunction", NULL);
FCBDispose(fcb);
DestroyEnvironment(env);
return 0;
}
Thanks you in advance for helping