- Joined
- Apr 16, 2014
- Messages
- 15
- Reaction score
- 0
anyone use this code??
i got these errors
already defined in defineitem.h and DPSrvr.h
what should i do??
note:
its just a copy/paste work
and didnt edit ANYTHING on that
Thanks
PHP:
#ifdef __RAISE_PETS
case II_SYS_LION:
case II_SYS_RABBIT:
case II_SYS_TIGER:
case II_SYS_FOX:
case II_SYS_DRAGON:
case II_SYS_HIPPOGRIPH:
case II_SYS_HORSE:
b = DoUseItemTarget_PerfectPet(pUser, pMaterial, pTarget);
break;
#endif
PHP:
#ifdef __RAISE_PETS
BOOL CDPSrvr::DoUseItemTarget_PerfectPet( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget )
{
BOOL bPet;
BYTE nKind;
BYTE nExpRate = 99; //EXP RATE
BYTE nLevel = 5;// S KLASSE
BYTE nLife = 25;//Life is 25
CPet* pPet = pUser->GetPet();
if( pTarget->GetProp()->dwItemKind1 == IK1_GENERAL && pTarget->GetProp()->dwItemKind3 == IK3_EGG )
{
if( pPet == NULL )
{
pUser->AddText( "You dont have an summoned Egg!" );
return FALSE;
}
else if( pPet && pUser->GetPet()->GetLevel() != PL_EGG )
{
pUser->AddText( "You can only use an scroll of Perfect pets on Eggs!" );
return FALSE;
}
else
{
switch( pMaterial->m_dwItemId )
{
case II_SYS_LION:
nKind = 1;
bPet = TRUE;
break;
case II_SYS_RABBIT:
nKind = 2;
bPet = TRUE;
break;
case II_SYS_TIGER:
nKind = 0;
bPet = TRUE;
break;
case II_SYS_HORSE:
nKind = 6;
bPet = TRUE;
break;
case II_SYS_DRAGON:
nKind = 4;
bPet = TRUE;
break;
case II_SYS_HIPPOGRIPH:
nKind = 5;
bPet = TRUE;
break;
case II_SYS_FOX:
nKind = 3;
bPet = TRUE;
break;
default:
break;
}
if( bPet == TRUE )
{
if( nLevel > PL_S )
return TRUE;
if( IsValidObj( pUser ) == FALSE )//FEHLER ABGFRAGE
return TRUE;
if( pPet == NULL ) //FEHLER ABFRAGE
return TRUE;
// kind
if( nKind >= PK_MAX ) //FEHLER ABFRAGE
return TRUE;
CItemElem* pItemElem2 = pUser->GetPetItem();
pPet->SetKind( nKind );
pPet->SetLevel( nLevel );
pItemElem2->m_dwItemId = pPet->GetItemId();
pPet->SetEnergy( pPet->GetMaxEnergy() );
DWORD dwExp = pPet->GetMaxExp() * nExpRate / 100;
pPet->SetExp( dwExp );
for( int i = 0; i < 6; i++ )
pPet->SetAvailLevel(i, 9 ); //Here it will generate the Perfect pets with stats 9/9/9/9/9
pPet->SetLife( nLife );
if( pUser->HasPet() )
pUser->RemovePet();
g_dpDBClient.CalluspPetLog( pUser->m_idPlayer, pItemElem2->GetSerialNumber(), 0, PETLOGTYPE_LEVELUP, pPet ); //Log the change into database
pUser->AddPet( pPet, PF_PET_GET_AVAIL ); // PET EINFÜGEN
g_UserMng.AddPetLevelup( pUser, MAKELONG( (WORD)pPet->GetIndex(), (WORD)pPet->GetLevel() ) );
pUser->UpdateItem( (BYTE)pMaterial->m_dwObjId, UI_NUM, 0 );//Remove the scroll
//return TRUE;
}
}
}
return FALSE;
}
#endif
i got these errors
PHP:
DPSrvr.cpp(5632) : error C2065: 'II_SYS_LION' : undeclared identifier
DPSrvr.cpp(5632) : error C2051: case expression not constant
DPSrvr.cpp(5633) : error C2065: 'II_SYS_RABBIT' : undeclared identifier
DPSrvr.cpp(5633) : error C2051: case expression not constant
DPSrvr.cpp(5634) : error C2065: 'II_SYS_TIGER' : undeclared identifier
DPSrvr.cpp(5634) : error C2051: case expression not constant
DPSrvr.cpp(5635) : error C2065: 'II_SYS_FOX' : undeclared identifier
DPSrvr.cpp(5635) : error C2051: case expression not constant
DPSrvr.cpp(5636) : error C2065: 'II_SYS_DRAGON' : undeclared identifier
DPSrvr.cpp(5636) : error C2051: case expression not constant
DPSrvr.cpp(5637) : error C2065: 'II_SYS_HIPPOGRIPH' : undeclared identifier
DPSrvr.cpp(5637) : error C2051: case expression not constant
DPSrvr.cpp(5638) : error C2065: 'II_SYS_HORSE' : undeclared identifier
DPSrvr.cpp(5638) : error C2051: case expression not constant
DPSrvr.cpp(13000) : error C3861: 'II_SYS_LION': identifier not found, even with argument-dependent lookup
DPSrvr.cpp(13000) : error C2051: case expression not constant
DPSrvr.cpp(13004) : error C3861: 'II_SYS_RABBIT': identifier not found, even with argument-dependent lookup
DPSrvr.cpp(13004) : error C2051: case expression not constant
DPSrvr.cpp(13008) : error C3861: 'II_SYS_TIGER': identifier not found, even with argument-dependent lookup
DPSrvr.cpp(13008) : error C2051: case expression not constant
DPSrvr.cpp(13012) : error C3861: 'II_SYS_HORSE': identifier not found, even with argument-dependent lookup
DPSrvr.cpp(13012) : error C2051: case expression not constant
DPSrvr.cpp(13016) : error C3861: 'II_SYS_DRAGON': identifier not found, even with argument-dependent lookup
DPSrvr.cpp(13016) : error C2051: case expression not constant
DPSrvr.cpp(13020) : error C3861: 'II_SYS_HIPPOGRIPH': identifier not found, even with argument-dependent lookup
DPSrvr.cpp(13020) : error C2051: case expression not constant
DPSrvr.cpp(13024) : error C3861: 'II_SYS_FOX': identifier not found, even with argument-dependent lookup
DPSrvr.cpp(13024) : error C2051: case expression not constant
already defined in defineitem.h and DPSrvr.h
what should i do??
note:
its just a copy/paste work
and didnt edit ANYTHING on that
Thanks

