How to replace the function assist_string(.....)
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 ?
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.
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?
You should just change your sprintf
to include the real string:
sprintf(s,"Your actual assistance string manually grabbed from the resources");