Altair
Member
|
Problem with the player's items
Hi
I downloaded the latest version of the engine. In the Name Changes was written:
Quote:virtual _Memx* Game::Obj::itemContainer() -> Memx<Game::Item>* itemContainer
So I changed the code to:
Code:
virtual Memx<Item>* itemContainer(){return &item;}
But there were errors:
Quote:error C2555: 'Player::itemContainer': overriding virtual function return type differs and is not covariant from 'EE::Game::Obj::itemContainer'
see declaration of 'EE::Game::Obj::itemContainer'
I have no idea how to solve this problem.
Changes "Item" to "Game::Item" helps but then I can not store information about items.
How can I solve this problem?
|
|
02-21-2010 10:37 AM |
|
Grabonito
Member
|
RE: Problem with the player's items
maybe so
Memx<Game::Item> item;
virtual Memx<Game::Item>* itemContainer(){return &item;}
|
|
02-21-2010 10:45 AM |
|
Kamil18
Member
|
RE: Problem with the player's items
"EsenthelEngineSDK\Tutorials\Source\Advanced\5 - Projects (here all files from a single directory need to be included in project)\02 - Inventory\Player.h"
|
|
02-21-2010 11:00 AM |
|
Altair
Member
|
RE: Problem with the player's items
Thanks KAMIL18
Now its working
|
|
02-21-2010 11:12 AM |
|