Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to pass array of objects as argument and work on it's items, but I got some exception and weird errors. This is my code:
#include <maxscript/maxscript.h> #include <maxscript/macros/define_instantiation_functions.h> def_visible_primitive(TestFunction, "TestFunction"); Value* TestFunction_cf(Value **arg_list, int count) { Array* nodesArray = (Array*)arg_list[0]; INodeTab* nodes = new INodeTab(); for (int i = 0; i < nodesArray->size; i++) { INode* node = (INode*)nodesArray->data[i]; nodes->AppendNode(node); } mprintf((*nodes)[0]->GetName()); return &ok; }
Where is my mistake?
Solved! Go to Solution.