Hi Tomasz,
this just isn't working for me. Can you please tell me where I'm going wrong?

void Amibroker::printf(const char * output){
        AmiVar args[21];
        for (int i=1; i<21; i++){
                args[i].type = VAR_FLOAT;
                args[i].val = EMPTY_VAL;
        }
        args[0].type = VAR_STRING;
        args[0].string = (char *)SI->Alloc(100);
        strcpy(args[0].string, "Testing printf %0.0f");
        args[1].val = 3.0f;

        AmiVar result = SI->CallFunction("printf", 21, args);
}

I'm getting a return value of 1 in the result AmiVar. I've been through with 
debugger and all inputs look fine. It executes no problems but I get no output 
in Interpretation window.

It makes no difference if I input a single string with no format params either.

Regards,
Jules.

Reply via email to