About Store Forum Documentation Contact



Post Reply 
The problem with the container Memx
Author Message
Babulesnik Offline
Member

Post: #1
The problem with the container Memx
I created two classes of container Memx
PHP Code:
struct StructRoom  //Класс "комната"
{
  
Memx<StructPlayer>MemRoomPlayersList//список игроков в комнате

  
Str  NameRoom      //название комнаты
  
Byte MaxPlayers    //максимальное количество игроков
  
Byte TotalPlayers  //всего игроков
  
Flt  Bet           //ставка
  
Byte StateRoom     //состояние комнаты 
  
Byte StageGame     //стадия игры 
};

struct StructRoomsList //Kласс список комнат
{
  
Memx<StructRoom>MemRoomsList//глобальный список комнат
    
  
StructRoom Room;

  
bool AddRoom  (Str &NameRoom Byte &MaxPlayers Flt &Bet StructPlayer &LinkPlayer );
  
bool AddPlayer(Str &NameRoom StructPlayer     &LinkPlayer                           );  //добавить игрока в комнату
  
int  FindRoom (Str &NameRoom Byte &ReturnTotalPlayers Byte &ReturnMaxPLayers      );
 
  
bool ReturnListRooms   File &) ;

}; 

But when I changed Memc to Memx the error appears

PHP Code:
bool StructRoomsList::AddRoom(Str &NameRoom Byte &MaxPlayers Flt &Bet StructPlayer &LinkPlayer)
  {
      
FREPA(MemRoomsList)
      {
          if(
T.MemRoomsList[i].NameRoom==NameRoom
          {
            return 
false;
          }
      }
      {
      
Room.NameRoom     NameRoom     ;
      
Room.MaxPlayers   MaxPlayers   ;
      
Room.Bet          Bet          ;

       
T.MemRoomsList.New()=(Room);  //добавляем комнату в глобальном списке комнат -ERROR STRING !!!

       
T.AddPlayer(NameRoom,LinkPlayer); //добавляем ссылку на игрока в списке игроков

      
}

      return 
true;
  } 

Error:
PHP Code:
1>c:\users\дмитрий\desktop\esenthelenginesdk\tutorials\server\serverlists.cpp(94): error C2783'void EE::_Memx::operator =(EE::_Memx &)' could not deduce template argument for 'UNUSED'
1>          d:\microsoft visual studio 10.0\vc\include\esenthelengine\memory\_memx.h(44) : see declaration of 'EE::_Memx::operator ='
1>          This diagnostic occurred in the compiler generated function 'EE::Memx<TYPE> &EE::Memx<TYPE>::operator =(EE::Memx<TYPE> &)'
1>          with
1
>          [
1>              TYPE=StructPlayer
1
>          ] 
09-19-2011 08:07 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: The problem with the container Memx
Memx doesn't have operator =
I an add this for next SDK
09-20-2011 11:36 AM
Find all posts by this user Quote this message in a reply
Babulesnik Offline
Member

Post: #3
RE: The problem with the container Memx
(09-20-2011 11:36 AM)Esenthel Wrote:  Memx doesn't have operator =
I an add this for next SDK
Thank you very much !
09-20-2011 05:16 PM
Find all posts by this user Quote this message in a reply
Post Reply