brian.firfer Posted April 1, 2013 Share Posted April 1, 2013 Trying to create a new node code side and its complaining that it cant find a constructor with 0 arguments, but I have seen several examples of constructing a new node (image_atlas.h, and a post on the forum) that do not have any parameters. Is that code outdated and the Node constructor now has multiple parameters? Or perhaps I am not including? I tried giving it a single string argument as well as one forum post shows, but this didn't work either. "ExternClass::get_constructor(): can't find constructor with 0 arguments" Link to comment
manguste Posted April 1, 2013 Share Posted April 1, 2013 The function library is up to date, so you can refer to it if in doubt. Please, post a minimal test scene, otherwise we'll have no clue what's happening. Link to comment
brian.firfer Posted April 2, 2013 Author Share Posted April 2, 2013 You can repro the issue by adding a single line to the Player Character constructor. C:\Unigine evaluation\data\demos\shooter\scripts\player\player_character.h Add the line Node newnode = new Node(); to the function PlayerCharacter(mat4 transform,string property_name) { and you will get the same compile error. Link to comment
ulf.schroeter Posted April 2, 2013 Share Posted April 2, 2013 Maybe caused by the fact that Node is general base class. Try NodeDummy instead. Link to comment
brian.firfer Posted April 2, 2013 Author Share Posted April 2, 2013 NodeDummy does in fact compile... Does that mean that C:\Unigine evaluation\data\core\scripts\image_atlas.h only complies because its in the core folder? Is there a list somewhere of which objects are inaccessible for construction? Link to comment
ulf.schroeter Posted April 2, 2013 Share Posted April 2, 2013 No, totally different thing: ImageAtlas defines it's own internal ImageAtlas:: Node class. Link to comment
brian.firfer Posted April 4, 2013 Author Share Posted April 4, 2013 So, is there a list of which objects are inaccessible for construction? Link to comment
ulf.schroeter Posted April 4, 2013 Share Posted April 4, 2013 No, but this should be more or less Node, Object, Shape, Stream base classes. Link to comment
Recommended Posts