Cristianwolf712 Posted February 14, 2014 Share Posted February 14, 2014 Hi guys, I noticed that kind of bug a few times ago, but I don't know exactly how to fix or create a workaround. It happens if you create a bunch of derived classes, unigine can't compile the code because of "DerivedClass: Interpreter::parse_user_class_prototype(): can't find "Base_Class" base class". I have created the following classes: class Building class EconomyBuilding : Building class ProductionBuilding : EconomyBuilding class PrimaryProductionBuilding : ProductionBuilding class SecondaryProductionBuilding : ProductionBuilding class Storage : EconomyBuilding All of the classes have a #ifndef/#define/#endif preprocessors like descriped in the documentation. Also, they have a #include-file that have a directive to their BaseFile. Now I want to add another class Field : EconomyBuilding. I got the "EconomyBuilding: Interpreter::parse_user_class_prototype(): can't find "Building.h" base class." I used the latest game-kit, but as I stated above, it happend with the last eval-kits too. Link to comment
silent Posted February 14, 2014 Share Posted February 14, 2014 Hi Christian, Could you please sent us minimal test scene for reproduction? It will surely help us to find the root of this issue faster. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Cristianwolf712 Posted February 14, 2014 Author Share Posted February 14, 2014 Hi silent, astonishingly it was really easy to reproduce that behaviour in the shooter example. I created 3 new enemy classes (attached file) for testing purpose. Unzip it in data/ framework/samples/shooter/scripts. Replace the shooter_level.h with the existing one. I only added the following line in there: #include <framework/samples/shooter/scripts/flyingbeast.h> Now start the shooter example and you spawn under your level with error: 14:28:58 class FlyingBeast : Biest 14:28:58 framework/samples/shooter/scripts/flyingbeast.h:10: Interpreter::parse_user_class_prototype(): can't find "Biest" base class 14:28:58 Game::LogicModules::compile(): Can't compile logic module 14:28:58 Game::Game::load_logic(): can not compile logic module. 14:28:58 Game::Game::load_level(): can load game logic. 14:28:58 Game::Game::init(): can't load level instance. scripts.rar Link to comment
silent Posted February 14, 2014 Share Posted February 14, 2014 Hi, Thanks for the test files! We will check this ASAP. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
silent Posted February 17, 2014 Share Posted February 17, 2014 Hi Christian, Please, try to create your new Entities from Game Framework GUI. Script doesn't know about them, since there is no changes in shooter.game file, which will be updated only when you will create your Entities from Game Framework GUI. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Cristianwolf712 Posted February 17, 2014 Author Share Posted February 17, 2014 Hi silent, thanks for that. I created the derived classes only for bug demonstration. In my game I have other classes, that aren't entities (e.g. buildings). For thoose classes the Problem still exist. Link to comment
silent Posted February 17, 2014 Share Posted February 17, 2014 Hi, Could you please sent us complete game framework project (with scripts, levels, meshes, etc). It's hard to say what cause this issue. Also it doesn't clear why you can't use entities for buildings, it is possible. We are making Strategy game sample now with many production builings, which are actually entities and we have no strange crashes here. Maybe if we can look at your complete project we can find the root if this issue. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Cristianwolf712 Posted February 17, 2014 Author Share Posted February 17, 2014 PM'ed you. Link to comment
necris Posted February 21, 2014 Share Posted February 21, 2014 Problem was solved in PM :) Cristian, if you still have any questions - you are welcome. Link to comment
Cristianwolf712 Posted February 21, 2014 Author Share Posted February 21, 2014 Thanks necris. The problem still exists. Don't know why. I create a blank new class as "farm.h" and include my buidling.h-base class, but log still says it can't find building-base class. Strange thing. I'm about to create the building classes as entites.... Link to comment
Recommended Posts