Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/04/2008 at 11:53, xxxxxxxx wrote:
User Information: Cinema 4D Version: 10.5 Platform: Mac OSX ; Language(s) : C++ ;
--------- If anyone wouldn't mind helping me understand this error, it would be hugely appreciated.
Here's the plugin source file:
> <code>#include "c4d.h" > > class MyTagPlugin : public TagData > { > public: > virtual Bool Init(GeListNode *node); > virtual LONG Execute(PluginTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, LONG priority, LONG flags); > > static NodeData *Alloc(void) { return gNew MyTagPlugin; } > } > > Bool MyTagPlugin::Init(GeListNode *node) > { > # > # ERROR HAPPENS HERE (says XCode) : "error: expected initializer before 'MyTagPlugin' > # > //BaseTag *tag = (BaseTag* )node; > //BaseContainer *data = tag->GetDataInstance(); > return TRUE > } > > LONG MyTagPlugin::Execute(PluginTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, LONG priority, LONG flags) > { > GePrint("Executing!!"); > > return EXECUTION_RESULT_OK; > } > > #define ID_MYTAGPLUGIN 10000001 > Bool RegisterMyTagPlugin(void) > { > return RegisterTagPlugin(ID_MYTAGPLUGIN,"MyTagName",TAG_EXPRESSION|TAG_VISIBLE,MyTagPlugin::Alloc,"","",0); > } > </code>
On 11/04/2008 at 12:00, xxxxxxxx wrote:
A semicolon after "return TRUE" would help! There should also be one at the end of the class definition:
class MyTagPlugin : public TagData { public: virtual Bool Init(GeListNode *node); virtual LONG Execute(PluginTag* tag, BaseDocument* doc, BaseObject* op, BaseThread* bt, LONG priority, LONG flags);
static NodeData *Alloc(void) { return gNew MyTagPlugin; } };
On 11/04/2008 at 12:02, xxxxxxxx wrote:
Well son of a b... I was so wrapped up getting the API stuff I missed the simple. Thanks again, built fine!