nintry
New Member
- Joined
- Oct 18, 2017
- Messages
- 6
- Reaction score
- 2
I need some help to make a function to:
- When player shot the last ammo (arrow, bolt...)
- If player have another ammo like that on inventory
- Automatically recharge
A guy here made some like that:
Feature - Auto recharge ammo
And some guys tried to convert to 0.4 with no sucess:
Compiling - Help to add Auto Recharge Ammo in 0.4
I've tried too with this errors:
weapons.cpp:
hastebin
- When player shot the last ammo (arrow, bolt...)
- If player have another ammo like that on inventory
- Automatically recharge
A guy here made some like that:
Feature - Auto recharge ammo
And some guys tried to convert to 0.4 with no sucess:
Compiling - Help to add Auto Recharge Ammo in 0.4
I've tried too with this errors:
Code:
weapons.cpp:447:48: error: ‘class Player’ has no member named ‘getItemTypeCount’; did you mean ‘__getItemTypeCount’?
uint32_t playerCount = player->getItemTypeCount(item->getID());
^~~~~~~~~~~~~~~~
weapons.cpp:451:37: error: ‘class Player’ has no member named ‘removeItemOfType’; did you mean ‘removeEnemy’?
player->removeItemOfType(item->getID(), 100);
^~~~~~~~~~~~~~~~
weapons.cpp:452:37: error: ‘class Player’ has no member named ‘addItem’; did you mean ‘addEnemy’?
player->addItem(itemid, 100, 0, CONST_SLOT_AMMO);
^~~~~~~
weapons.cpp:452:61: error: ‘CONST_SLOT_AMMO’ was not declared in this scope
player->addItem(itemid, 100, 0, CONST_SLOT_AMMO);
^~~~~~~~~~~~~~~
weapons.cpp:456:37: error: ‘class Player’ has no member named ‘removeItemOfType’; did you mean ‘removeEnemy’?
player->removeItemOfType(item->getId(), playerCount);
^~~~~~~~~~~~~~~~
weapons.cpp:456:60: error: ‘class Item’ has no member named ‘getId’; did you mean ‘getID’?
player->removeItemOfType(item->getId(), playerCount);
^~~~~
weapons.cpp:457:37: error: ‘class Player’ has no member named ‘addItem’; did you mean ‘addEnemy’?
player->addItem(itemid, playerCount, 0, CONST_SLOT_AMMO);
^~~~~~~
weapons.cpp:457:69: error: ‘CONST_SLOT_AMMO’ was not declared in this scope
player->addItem(itemid, playerCount, 0, CONST_SLOT_AMMO);
^~~~~~~~~~~~~~~
Makefile:8: recipe for target 'tfs' failed
make: *** [tfs] Error 1
weapons.cpp:
hastebin