On 03/02/2014 at 08:49, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : C++ ;
---------
Found a small typo in the C++ docs for making custom libraries.
Bool MyLibraryFunction(LONG v, String s)
{
MyFunctionLib* flib = CheckMyFunctionLib(LIBOFFSET(MyFunctionLib, MyLibraryFunction));
//if (!lfib || !flib->MyLibraryFunction) return FALSE; //<--- typo
if (!flib || !flib->MyLibraryFunction) return FALSE; //<--- Corrected
return flib->MyLibraryFunction(v, s);
}
Also. Can I make a humble suggestion?
You guys did a great job with the docs here by including the complete example code.
But you don't show the user what to actually do with them. And you leave them hanging on what to do next.
I think it would help newbies a lot if you add something to the docs indicating that you must also create a main.cpp file and compile these libraries the same way we compile any other plugins.
I had no idea what to do with the provided code until I remembered how I wrote my CustomDataType plugins.
If I hadn't ever built a CustomDataType plugin. I would not know what to do with your example code.
Just a suggestion.
-ScottA