Problem
please help me :/ its for a Upgrade command u type command the item what should be upgraded break and down from ur feets is the upgraded item.. now i have this problem (I copy from hbsh3 hgserver source what cyrus gaved me with this upgrade commands only other commands not in... so i change hgserver to a better one with everything fixed now i got this error)
if ((memcmp(cItemName,"MagicGem(DEF)",14) == 0) && (ipoints >= 10) && (ipoints - 10 >= 0)) {
ItemDepleteHandler(iClientH, i, TRUE);
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
iClientH must stay
i must stay
TRUE? idk
i must stay
TRUE? idk
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
lol but with other things the deplete handler works ... but if u really want
Code: Select all
void CGame::ItemDepleteHandler(int iClientH, short sItemIndex, BOOL bIsUseItemResult, BOOL bIsItemUsed)
{
if (m_pClientList[iClientH] == NULL) return;
if (m_pClientList[iClientH]->m_bIsInitComplete == FALSE) return;
if ((sItemIndex < 0) || (sItemIndex >= DEF_MAXITEMS)) return;
if (m_pClientList[iClientH]->m_pItemList[sItemIndex] == NULL) return;
if ((bIsItemUsed == 1) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_cItemType == DEF_ITEMTYPE_CONSUME) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_cItemType == DEF_ITEMTYPE_EAT) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_cItemType == DEF_ITEMTYPE_USE_DEPLETE) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_cItemType == DEF_ITEMTYPE_USE_DEPLETE_DEST) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_cItemType == DEF_ITEMTYPE_MATERIAL) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_sIDnum == 380) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_sIDnum == 381) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_sIDnum == 382)) {
_bItemLog(DEF_ITEMLOG_DEPLETE, iClientH, -1, m_pClientList[iClientH]->m_pItemList[sItemIndex], FALSE);
}
else if ((m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_sIDnum == 247) ||
(m_pClientList[iClientH]->m_pItemList[sItemIndex]->m_sIDnum == 248)) {
_bItemLog(DEF_ITEMLOG_DEPLETE, iClientH, -1, m_pClientList[iClientH]->m_pItemList[sItemIndex], FALSE);
}
ReleaseItemHandler(iClientH, sItemIndex, TRUE);
SendNotifyMsg(NULL, iClientH, DEF_NOTIFY_ITEMDEPLETED_ERASEITEM, sItemIndex, (int)bIsUseItemResult, NULL, NULL);
delete m_pClientList[iClientH]->m_pItemList[sItemIndex];
m_pClientList[iClientH]->m_pItemList[sItemIndex] = NULL;
m_pClientList[iClientH]->m_bIsItemEquipped[sItemIndex] = FALSE;
m_pClientList[iClientH]->m_cArrowIndex = _iGetArrowItemIndex(iClientH);
iCalcTotalWeight(iClientH);
}
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
iClientH must stay ?????????????? what u mean with that? i dont know what this 3 parameters mean i dont know whats wrong (if i replace my item deplete handler with the one from hbsh3 i got same 9 errors again and 1 more....)
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
Kiruku wrote: iClientH must stay ?????????????? what u mean with that? i dont know what this 3 parameters mean i dont know whats wrong (if i replace my item deplete handler with the one from hbsh3 i got same 9 errors again and 1 more....)
Code: Select all
void CGame::ItemDepleteHandler(int iClientH, short sItemIndex, BOOL bIsUseItemResult, BOOL bIsItemUsed)
<img src='http://drazzt.iespana.es/Drazzt/logo2.jpg' border='0' alt='user posted image' />
and what to fix and how to fix?
HEEEELLLPPPPP plz :/
HEEEELLLPPPPP plz :/
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
ItemDepleteHandler(iClientH, i, TRUE);
hmm here is 3 parameters but why cant it take.. idk
hmm here is 3 parameters but why cant it take.. idk
<img src='http://www.hot.ee/carvanho/taavi.png' border='0' alt='user posted image' /><br><br><img src='http://www.hot.ee/carvanho/Elvine.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/LieroX.png' border='0' alt='user posted image' /><br><img src='http://www.hot.ee/carvanho/Football.png' border='0' alt='user posted image' />
lol i see 4>
here why
void CGame::ItemDepleteHandler()int iClientH, short sItemIndex, BOOL bIsUseItemResult, BOOL bIsItemUsed
ok now u got
ItemDepleteHandler(iClientH, i, TRUE);
this one is only doing
int iClientH, short sItemIndex, BOOL bIsUseItemResult
~ the TRUE ->bIsUseItemResult
~~~~~~~~~~~~~~~~~~~~~~~~~~~
ItemDepleteHandler(iClientH, i, TRUE, TRUE);
this one dose all 4
int iClientH, short sItemIndex, BOOL bIsUseItemResult, BOOL bIsItemUsed
:)
here why
void CGame::ItemDepleteHandler()int iClientH, short sItemIndex, BOOL bIsUseItemResult, BOOL bIsItemUsed
ok now u got
ItemDepleteHandler(iClientH, i, TRUE);
this one is only doing
int iClientH, short sItemIndex, BOOL bIsUseItemResult
~ the TRUE ->bIsUseItemResult
~~~~~~~~~~~~~~~~~~~~~~~~~~~
ItemDepleteHandler(iClientH, i, TRUE, TRUE);
this one dose all 4
int iClientH, short sItemIndex, BOOL bIsUseItemResult, BOOL bIsItemUsed
:)
<img src='http://lifeplaysu420.com/unknow/nightsign.png' border='0' alt='user posted image' /><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Wanna make money for surfing the net sing up at <br><a href='http://www.cashfiesta.com/php/join.php? ... yprivitera' target='_blank'>cash fiesta</a><br>its all free hey why ntot make money while fucking around on the computer<br><br><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ok every error fixed but i got 3 warnings
here is one of it in code
i think it has something to do with the ItemDepleteHandler because before life gaved me his fix they wasnt there
Code: Select all
G:\Helbreath\Sources\ChaosHGServ\Game.cpp(58750) : warning C4101: 'iItemID' : unreferenced local variable
G:\Helbreath\Sources\ChaosHGServ\Game.cpp(58799) : warning C4101: 'iItemID' : unreferenced local variable
G:\Helbreath\Sources\ChaosHGServ\Game.cpp(58848) : warning C4101: 'iItemID' : unreferenced local variable
Code: Select all
void CGame::PlayerOrder_DmgGem(int iClientH) {
{
int i;
char buff [100];
int iItemID;
char cItemName[20];
int ipoints;
if (m_pClientList[iClientH] == NULL) return;
ipoints=0;
for (i = 0; i < DEF_MAXITEMS; i++) {
if ((m_pClientList[iClientH]->m_pItemList[i] != NULL) && (memcmp(m_pClientList[iClientH]->m_pItemList[i]->m_cName, "MagicGem(DMG)", 13) == 0)) {
ZeroMemory(cItemName,sizeof(cItemName));
memcpy(cItemName,m_pClientList[iClientH]->m_pItemList[i]->m_cName,strlen(m_pClientList[iClientH]->m_pItemList[i]->m_cName));
wsprintf(buff,"(!) %s depletes %s",m_pClientList[iClientH]->m_cCharName,cItemName);
ipoints = m_pClientList[iClientH]->m_iGizonItemUpgradeLeft;
PutLogList(buff);
if (ipoints < 10) return;
if ((memcmp(cItemName,"MagicGem(DMG)",14) == 0) && (ipoints >= 10) && (ipoints - 10 >= 0)) {
ItemDepleteHandler(iClientH, i, TRUE, TRUE);
ipoints -= 10;
DropItemID(iClientH,938,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
wsprintf(buff," Majestic upgrade decreased 10 points");
ShowRepNotice(iClientH,buff);
return;
}
if ((memcmp(cItemName,"MagicGem(DMG)+1",15) == 0) && (ipoints >= 20) && (ipoints - 20 >= 0)) {
ItemDepleteHandler(iClientH, i, TRUE, TRUE);
ipoints -= 20;
DropItemID(iClientH,939,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
wsprintf(buff," Majestic upgrade decreased 20 points");
ShowRepNotice(iClientH,buff);
return;
}
if ((memcmp(cItemName,"MagicGem(DMG)+2",15) == 0) && (ipoints >= 30) && (ipoints - 30 >= 0)) {
ItemDepleteHandler(iClientH, i, TRUE, TRUE);
ipoints -= 30;
DropItemID(iClientH,940,m_pClientList[iClientH]->m_sX,m_pClientList[iClientH]->m_sY);
m_pClientList[iClientH]->m_iGizonItemUpgradeLeft = ipoints;
wsprintf(buff," Majestic upgrade decreased 30 points");
ShowRepNotice(iClientH,buff);
return;
}
}
}
}
}
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
plz help me fix this warnings...
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />
-
- Loyal fan
- Posts: 216
- Joined: Wed Apr 19, 2006 12:19 am
easy fix but i forgot where i put my c++ stuff -.-Kiruku wrote: plz help me fix this warnings...
<img src='http://img114.imageshack.us/img114/8618 ... 2dy3lx.jpg' border='0' alt='user posted image' />
why u dont use the comp search ? ctrl+f on explorer then u should find it
<img src='http://lichtdrache.lima-city.de/helbrea ... aramba.gif' border='0' alt='user posted image' />