How to replace the function assist_string(.....)

Michielske3's icon

Michielske3

3月 21 2010 | 6:38 午後

Hi,

I'm new to MAX and i'm working to rebuild a source code.
It seems the sourcecode is from an earlier Max version because i'm having problems with the function assist_string.
After some research on the internet it seems the function does not exist anymore in the MAX API. Is there anohter function that is doing the same thing or is there a workaround available ?

Emmanuel Jourdan's icon

Emmanuel Jourdan

3月 21 2010 | 6:58 午後

assist_string was from the day where the assistance was stored in the object's resources. It has been replaced by the assist method. So you need to implement the "assist" method to your object. Look at simplemax object from the SDK for a simple example.

Michielske3's icon

Michielske3

3月 23 2010 | 12:03 午前

I checked the simple max object

and i build this:
char temp[512];
sprintf(temp,"%d",RES_ID);
    switch (m) {
        case 1:
            switch (a) {
                case 0:
                            snprintf_zero(s, 512,temp);
                    break;
                case 1:
                            snprintf_zero(s, 512,temp);
                    break;
            }
            break;
            case 2:
                        snprintf_zero(s, 512,temp);
            break;
}

but this seems not working.

Old code was:

rescopy('STR#', //RES_ID);

this happened in the void main void.
In the assist part:

assist_string(RES_ID,m,a,1,2,s)

With my code i just get the ID number and not the in and oulet texts

What am i doing wrong?

Emmanuel Jourdan's icon

Emmanuel Jourdan

3月 24 2010 | 12:07 午後

You should just change your sprintf to include the real string:

sprintf(s,"Your actual assistance string manually grabbed from the resources");