#ifdef ENABLE_CHEQUE_SYSTEM
case POINT_CHEQUE:
{
const int64_t nTotalCheque = static_cast<int64_t>(GetCheque()) + static_cast<int64_t>(amount);
if (amount > 0 && nTotalCheque > CHEQUE_MAX)
{
sys_err("[OVERFLOW_CHEQUE] OriCheque %lld AddedCheque %lld id %u Name %s ",
static_cast<long long>(GetCheque()),
static_cast<long long>(amount),
GetPlayerID(),
GetName());
LogManager::instance().CharLog(this, nTotalCheque, "OVERFLOW_CHEQUE", "");
return;
}
SetCheque(nTotalCheque);
val = GetCheque();
}
break;
#endif
oldu hocam çok teşekkür ederim ama /set le alınca yine atıyormuş farkettim şimdiif (CHEQUE_MAX <= nTotalCheque)
Değiştir
if (amount > 0 && GetCheque() > CHEQUE_MAX - amount)
Mobildeyim olmazsa PC geçince bakalım
#0 strlen (str=0x2 <error: Cannot access memory at address 0x2>) at /usr/src/lib/libc/string/strlen.c:92
lp = 0x0
va = <optimized out>
p = <optimized out>
vb = <optimized out>
#1 0x20f8e68c in __vfprintf (fp=0xffbfacdc, locale=0x2103b18c <__xlocale_global_locale>,
fmt0=0x438f2b "[OVERFLOW_CHEQUE] OriCheque %d AddedCheque %d id %u Name %s ", ap=<optimized out>)
at /usr/src/lib/libc/stdio/vfprintf.c:908
xdigs_lower = "0123456789abcdef"
xdigs_upper = "0123456789ABCDEF"
initial = <optimized out>
gs = {thousands_sep = 0x0, thousep_len = 0, grouping = 0x0, lead = 0, nseps = 0, nrepeats = 0}
fparg = {dbl = 0, ldbl = 0}
expstr = "\000\000\000\000\000\000\000"
io = {fp = 0x30303030, uio = {uio_iov = 0xffbfacdc, uio_iovcnt = -4215712, uio_resid = 1}, iov = {{iov_base = 0x6,
iov_len = 4427614}, {iov_base = 0x6, iov_len = 4290751567}, {iov_base = 0x1, iov_len = 0}, {iov_base = 0x0,
iov_len = 0}, {iov_base = 0x0, iov_len = 0}, {iov_base = 0x0, iov_len = 0}, {iov_base = 0x0, iov_len = 0}, {
iov_base = 0x0, iov_len = 0}}}
buf = '\000' <repeats 29 times>, "100"
ox = "\000"
statargtable = {{intarg = 9667212, uintarg = 9667212, longarg = 9667212, ulongarg = 9667212,
longlongarg = -18106654397332852, ulonglongarg = 18428637419312218764, ptrdiffarg = 9667212, sizearg = 9667212,
intmaxarg = -18106654397332852, uintmaxarg = 18428637419312218764, pvoidarg = 0x93828c <__stack_chk_guard>,
pchararg = 0x93828c <__stack_chk_guard> "\"\023C[N\330\201w{<_Ca\362\030\365\2540\004\325\ri\233Z\235.\177\232\310e\343 ;\377\377\377\377\003",
pschararg = 0x93828c <__stack_chk_guard> "\"\023C[N\330\201w{<_Ca\362\030\365\2540\004\325\ri\233Z\235.\177\232\310e\34 3;\377\377\377\377\003", pshortarg = 0x93828c <__stack_chk_guard>, pintarg = 0x93828c <__stack_chk_guard>,
plongarg = 0x93828c <__stack_chk_guard>, plonglongarg = 0x93828c <__stack_chk_guard>,
sys_err("[OVERFLOW_CHEQUE] OriCheque %d AddedCheque %d id %u Name %s ", GetCheque(), amount, GetPlayerID(), GetName());
sys_err("TEST SYSERR!!!");
sys_err("[OVERFLOW_CHEQUE] OriCheque %lld AddedCheque %lld id %u Name %s ", static_cast<long long>(GetCheque()), static_cast<long long>(amount), GetPlayerID(), GetName());
deniyorumÖncelikle şunu:
C++:sys_err("[OVERFLOW_CHEQUE] OriCheque %d AddedCheque %d id %u Name %s ", GetCheque(), amount, GetPlayerID(), GetName());
Test amaçlı şu şekilde değiştir:
C++:sys_err("TEST SYSERR!!!");
Bu düzenlemeden sonra eğer core vermeyip syserr dosyasına TEST SYSERR!!! yazarsa orjinal syserr satırını şu şekilde değiştirmeyi dene:
C++:sys_err("[OVERFLOW_CHEQUE] OriCheque %lld AddedCheque %lld id %u Name %s ", static_cast<long long>(GetCheque()), static_cast<long long>(amount), GetPlayerID(), GetName());
Buna rağmen düzelmezse ek olarak amount ve GetCheque verilerinin dönüş türünü kontrol et.
core vermediÖncelikle şunu:
C++:sys_err("[OVERFLOW_CHEQUE] OriCheque %d AddedCheque %d id %u Name %s ", GetCheque(), amount, GetPlayerID(), GetName());
Test amaçlı şu şekilde değiştir:
C++:sys_err("TEST SYSERR!!!");
Bu düzenlemeden sonra eğer core vermeyip syserr dosyasına TEST SYSERR!!! yazarsa orjinal syserr satırını şu şekilde değiştirmeyi dene:
C++:sys_err("[OVERFLOW_CHEQUE] OriCheque %lld AddedCheque %lld id %u Name %s ", static_cast<long long>(GetCheque()), static_cast<long long>(amount), GetPlayerID(), GetName());
Buna rağmen düzelmezse ek olarak amount ve GetCheque verilerinin dönüş türünü kontrol et.
GetName null geliyordur, şöyle değiştir o kısmı --> GetName() ? GetName() : "NoName";olmadı...
#ifdef ENABLE_CHEQUE_SYSTEM
case POINT_CHEQUE:
{
const int64_t nTotalCheque = static_cast<int64_t>(GetCheque()) + static_cast<int64_t>(amount);
if (amount > 0 && nTotalCheque > CHEQUE_MAX)
{
sys_err("[OVERFLOW_CHEQUE] OriCheque %lld AddedCheque %lld id %u Name %s ",
static_cast<long long>(GetCheque()),
static_cast<long long>(amount),
GetPlayerID(),
GetName());
LogManager::instance().CharLog(this, nTotalCheque, "OVERFLOW_CHEQUE", "");
return;
}
SetCheque(nTotalCheque);
val = GetCheque();
}
break;
#endif