Fidera-Global
Banned User
- Joined
- Jun 13, 2017
- Messages
- 32
- Solutions
- 1
- Reaction score
- 2
I'm trying to put 10 seconds delay in the transactions, but the delay never seems to end, what am I doing wrong?
player.h
game.cpp
tfs 1.3
player.h
C++:
bool canTransferCoins(int32_t delay) {
if ((OTSYS_TIME() - lastCoinTransfer) < delay) {
return false;
}
lastCoinTransfer = OTSYS_TIME();
return true;
}
game.cpp
C++:
if (!player->canTransferCoins(10000)) {
return player->sendStoreError(STORE_ERROR_TRANSFER, "Sorry you need wait 10 seconds to transfer again.");
}
tfs 1.3