johnsamir
Advanced OT User
help convert code i took this from tfs 1.2 and my server is 1.4/1.5 have tried several ways with no luck
and this code
is giving me errors
the error says -> or ->* applied to "IOMarket" instead of to a pointer type
nvm: solved changed -> to . it compiles
Lua:
MarketStatistics* statistics = IOMarket::getInstance()->getPurchaseStatistics(itemId);
if (statistics) {
msg.addByte(0x01);
msg.add<uint32_t>(statistics->numTransactions);
msg.add<uint32_t>(std::min<uint64_t>(std::numeric_limits<uint32_t>::max(), statistics->totalPrice));
msg.add<uint32_t>(statistics->highestPrice);
msg.add<uint32_t>(statistics->lowestPrice);
}
else {
msg.addByte(0x00);
}
//statistics = IOMarket::getInstance()->getSaleStatistics(itemId); //original
//statistics = marketInstance->getSaleStatistics(itemId);
//MarketStatistics* statistics = marketInstance->getSaleStatistics(itemId);
statistics = IOMarket::getInstance()->getSaleStatistics(itemId);
Lua:
MarketStatistics* statistics = IOMarket::getInstance()->getPurchaseStatistics(itemId);
Code:
statistics = IOMarket::getInstance()->getSaleStatistics(itemId)
the error says -> or ->* applied to "IOMarket" instead of to a pointer type
Post automatically merged:
nvm: solved changed -> to . it compiles