About Store Forum Documentation Contact



Post Reply 
Problem with the player's items
Author Message
Altair Offline
Member

Post: #1
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
Visit this user's website Find all posts by this user Quote this message in a reply
Grabonito Offline
Member

Post: #2
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
Find all posts by this user Quote this message in a reply
Kamil18 Offline
Member

Post: #3
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
Find all posts by this user Quote this message in a reply
Altair Offline
Member

Post: #4
RE: Problem with the player's items
Thanks KAMIL18
Now its working
02-21-2010 11:12 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply