20.06.2016, 06:44
When I run a server and a few moments later the server is dead, then I check the server logs appear error of crasdetect.
NewReaction:
What is wrong with the code? Please help me to fix this problem, thanks.
Code:
[02:34:19] [debug] Server crashed while executing GM.amx [02:34:19] [debug] AMX backtrace: [02:34:19] [debug] #0 00000046 in ?? (70, 70, 70, 125, 46, 0, 0, 0, 0, 0, ... <7 arguments>) from GM.amx [02:34:19] [debug] #1 00000046 in public NewReaction () from GM.amx
Code:
forward NewReaction(); public NewReaction() { if(ReactionActive == 1) { return 0; } else { new rtString[128]; for(new i = 0; i < RrandomEx(10, 12); i++) { strins(Reaction, Characters[random(sizeof Characters)], i); } ReactionPrize = (random(10000) + 10000); format(rtString, 160, "[REACTION TEST]:{FFFFFF} The first one to type {F81414}%s{FFFFFF} wins {F81414}$%i{FFFFFF} + {F81414}1 Score & 3 EXP{FFFFFF}.", Reaction, ReactionPrize); SendClientMessageToAll(COLOR_LIGHTBLUE, rtString); ReactionTime = GetTickCount(); ReactionActive = 1; SetTimer("EndReaction", 45000, 0); } return 1; }