Probleme compilare sursa db

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
Ionut14
Nivel 1

Nivel 1
Mesaje: 105
Membru din: 05 Sep 2018, 22:16
Server: Lucrez la unul!
Regat: Shinsoo
Aprecieri: 309  
Mulţumiri: 6  
Medalii

*Problemă/Întrebare: Eroare la fisierul table.h din common
Tipologie server(PvM / PvP):
*Resursă folosită: *Link exclusiv J4M*
*ServerFiles utilizat:
*Syserr: gmake: *** [.obj/Monarch.o] Error 1
root@:/usr/src/sursata/Server/db/src # gmake default
compiling Monarch.cpp
In file included from Monarch.h:9:0,
from Monarch.cpp:1:
../../common/tables.h:1577:34: error: 'MAX_NORM_ATTR_NUM' was not declared in this scope
TPlayerItemAttribute attributes[MAX_NORM_ATTR_NUM];
^
../../common/tables.h: In member function 'bool TSwitchbotAttributeAlternativeTable::IsConfigured() const':
../../common/tables.h:1581:25: error: 'attributes' was not declared in this scope
for (const auto& it : attributes)
^
../../common/tables.h: At global scope:
../../common/tables.h:1596:14: error: 'SWITCHBOT_SLOT_COUNT' was not declared in this scope
bool active[SWITCHBOT_SLOT_COUNT];
^
../../common/tables.h:1597:16: error: 'SWITCHBOT_SLOT_COUNT' was not declared in this scope
bool finished[SWITCHBOT_SLOT_COUNT];
^
../../common/tables.h:1598:14: error: 'SWITCHBOT_SLOT_COUNT' was not declared in this scope
DWORD items[SWITCHBOT_SLOT_COUNT];
^
../../common/tables.h:1599:51: error: 'SWITCHBOT_SLOT_COUNT' was not declared in this scope
TSwitchbotAttributeAlternativeTable alternatives[SWITCHBOT_SLOT_COUNT][SWITCHBOT_ALTERNATIVE_COUNT];
^
../../common/tables.h:1599:73: error: 'SWITCHBOT_ALTERNATIVE_COUNT' was not declared in this scope
TSwitchbotAttributeAlternativeTable alternatives[SWITCHBOT_SLOT_COUNT][SWITCHBOT_ALTERNATIVE_COUNT];
^
../../common/tables.h: In constructor 'TSwitchbotTable::TSwitchbotTable()':
../../common/tables.h:1603:11: error: 'items' was not declared in this scope
memset(&items, 0, sizeof(items));
^
../../common/tables.h:1604:11: error: 'alternatives' was not declared in this scope
memset(&alternatives, 0, sizeof(alternatives));
^
../../common/tables.h:1605:11: error: 'active' was not declared in this scope
memset(&active, false, sizeof(active));
^
../../common/tables.h:1606:11: error: 'finished' was not declared in this scope
memset(&finished, false, sizeof(finished));

Poză:
*Detalii suplimentare:

Codul din table.h
#ifdef ENABLE_SWITCHBOT
struct TSwitchbotAttributeAlternativeTable
{
TPlayerItemAttribute attributes[MAX_NORM_ATTR_NUM];

bool IsConfigured() const
{
for (const auto& it : attributes)
{
if (it.bType && it.sValue)
{
return true;
}
}

return false;
}
};

struct TSwitchbotTable
{
DWORD player_id;
bool active[SWITCHBOT_SLOT_COUNT];
bool finished[SWITCHBOT_SLOT_COUNT];
DWORD items[SWITCHBOT_SLOT_COUNT];
TSwitchbotAttributeAlternativeTable alternatives[SWITCHBOT_SLOT_COUNT][SWITCHBOT_ALTERNATIVE_COUNT];

TSwitchbotTable() : player_id(0)
{
memset(&items, 0, sizeof(items));
memset(&alternatives, 0, sizeof(alternatives));
memset(&active, false, sizeof(active));
memset(&finished, false, sizeof(finished));
}
};

struct TSwitchbottAttributeTable
{
BYTE attribute_set;
int apply_num;
long max_value;
};
#endif
Respect! :ymhug:
Afișează semnătura
Închis
Răspunsuri
1
Vizualizări
176
Răspunsuri
1
Vizualizări
159
Răspunsuri
4
Vizualizări
590
Răspunsuri
10
Vizualizări
553

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 78 vizitatori