Money Bug Will Freeze Server! -
PoniStar - 06.02.2019
hi , when i give players more than about $1,215,752,192 the server will freeze i mean its on but when you left the server player lists will not change and no one can connct just show the last players list , i give $1,215,752,192 twice and see this what should i do?
--- UPDATE: And after running server again when i join with that name who i gave money and bugged the server , the server will auto change that money to $999,999,999
Re: Money Bug Will Freeze Server! -
Lunoxx - 06.02.2019
Try to install crashdetect plugin.
Re: Money Bug Will Freeze Server! -
PoniStar - 07.02.2019
i have it but it will not show anything on server log, the server will not actually crash , it will freeze!
Re: Money Bug Will Freeze Server! -
Calisthenics - 07.02.2019
CTRL + C on samp server to send interrupt signal. If it is an infinite loop, it will show last function called.
Re: Money Bug Will Freeze Server! -
PoniStar - 07.02.2019
so, pressed ctrl+c when the server was freezed and got this lines:
Код:
[20:06:24] Administrator PoniStaR(0) Has Give PoniStaR(0) $999,999,999
[20:06:33] [debug] Server received interrupt signal while executing WorldWar1.amx
[20:06:33] [debug] AMX backtrace:
[20:06:33] [debug] #0 native valstr () in samp-server.exe
[20:06:33] [debug] #1 000aa05c in ?? (1999999998, 43233208, 64, 43219232) in WorldWar1.amx
[20:06:33] [debug] #2 00159d20 in ?? (0, 41989400) in WorldWar1.amx
[20:06:33] [debug] #3 0015ca54 in ?? (0, 41989400) in WorldWar1.amx
[20:06:33] [debug] #4 001022b0 in public ac_OnPlayerCommandText (0, 43219212) in WorldWar1.amx
[20:06:33] [debug] #5 0001c030 in public OnPlayerCommandText (0, 43219212) in WorldWar1.amx
[20:06:33] [debug] Native backtrace:
[20:06:33] [debug] #0 00406bf6 in ?? () in samp-server.exe
[20:06:33] [debug] #1 7516dc92 in ?? () in plugins\crashdetect.DLL
[20:06:33] [debug] #2 75175318 in ?? () in plugins\crashdetect.DLL
[20:06:33] [debug] #3 751697cc in ?? () in plugins\crashdetect.DLL
[20:06:33] [debug] #4 7516dcf4 in ?? () in plugins\crashdetect.DLL
[20:06:33] [debug] #5 74f13484 in ?? () in plugins\streamer.DLL
[20:06:33] [debug] #6 0046dd10 in ?? () in samp-server.exe
[20:06:33] [debug] #7 00452270 in ?? () in samp-server.exe
[20:06:33] [debug] #8 0049eef9 in ?? () in samp-server.exe
[20:06:33] [debug] #9 004aa31e in ?? () in samp-server.exe
what can i do with this??
Re: Money Bug Will Freeze Server! -
Kaliber - 07.02.2019
There is a bug in valstr that crashes the server, if the number is too high.
That is also mentioned in the wiki (
https://sampwiki.blast.hk/wiki/Valstr)
So use a fix:
PHP код:
#if defined _ALS_valstr
#error _ALS_valstr defined
#endif
native BAD_valstr(dest[], value, bool:pack = false) = valstr;
/**
* <fixes>valstr</fixes>
*/
#if FIX_valstr
stock FIXES_valstr(dest[], value, bool:pack = false)
{
// "format" can't handle cellmin properly.
static const
sc_szCellmin[] = !"-2147483648";
if (value == cellmin)
{
pack && strpack(dest, sc_szCellmin, 12) || strunpack(dest, sc_szCellmin, 12);
}
else
{
format(dest, 12, "%d", value),
pack && strpack(dest, dest, 12);
}
return 0;
}
#define _ALS_valstr
#define valstr( FIXES_valstr(
#endif
You can pack this in an Include...
or just use the hole fix-include:
https://github.com/Open-GTO/sa-mp-fixes
Re: Money Bug Will Freeze Server! -
PoniStar - 07.02.2019
so i should just inculde this , no more edit need in game mode right?
Re: Money Bug Will Freeze Server! -
PoniStar - 07.02.2019
fix.inc(10) : error 017: undefined symbol "FIX_valstr"
Re: Money Bug Will Freeze Server! -
Kaliber - 07.02.2019
Oh yeah sry, delete that line xD
Make just:
PHP код:
#if defined _ALS_valstr
#error _ALS_valstr defined
#endif
native BAD_valstr(dest[], value, bool:pack = false) = valstr;
/**
* <fixes>valstr</fixes>
*/
stock FIXES_valstr(dest[], value, bool:pack = false)
{
// "format" can't handle cellmin properly.
static const
sc_szCellmin[] = !"-2147483648";
if (value == cellmin)
{
pack && strpack(dest, sc_szCellmin, 12) || strunpack(dest, sc_szCellmin, 12);
}
else
{
format(dest, 12, "%d", value),
pack && strpack(dest, dest, 12);
}
return 0;
}
#define _ALS_valstr
#define valstr( FIXES_valstr(
Re: Money Bug Will Freeze Server! -
PoniStar - 07.02.2019
thnx , i have another problem can you helpme with this :
i have same problem like this:
https://sampforum.blast.hk/showthread.php?tid=433188
but he didnt explain how he fixed that , when i move the mouse all the map will get colored (gangzone) whats the problem!!?
Re: Money Bug Will Freeze Server! -
Kaliber - 07.02.2019
Open a new thread..
describe your problem...and show your code