Jump to content

[WONTFIX] Can't include existing base-class


photo

Recommended Posts

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

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

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

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:

Link to comment

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
×
×
  • Create New...