08.05.2014, 17:14
Hi. I recently moved my server from windows to linux (ubuntu), and for some reason it keeps crashing ~20 seconds after I join. It worked perfectly fine on windows.
This is my OnPlayerConnect:
The output I get in the terminal is "Segmentation fault.", and the error I get in the server log is "[debug] Server crashed while executing mrm.amx"
This is my OnPlayerConnect:
PHP код:
if(IsPlayerNPC(playerid)) return 1;
TotalConnect++;
if(Iter_Count(Player) > MaxPlayersConnected) {
MaxPlayersConnected = Iter_Count(Player);
getdate(MPYear,MPMonth,MPDay);
}
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
HackingMods[playerid] = 0;
pSpeed[playerid] = 0.0;
for(new i = 0; i < 3; i++) {
StopaniFloats[playerid][i] = 0;
}
RCPIdCurrent[playerid] = 0;
for(new i = 0; i < 6; i++) {
EventFloats[playerid][i] = 0.0;
}
EventLastInt[playerid] = 0; EventLastVW[playerid] = 0;
for(new i = 0; i < 6; i++) {
HHcheckFloats[playerid][i] = 0;
}
for(new i = 0; i < 5; i++) {
LottoNumbers[playerid][i] = 0;
}
acstruct[playerid][LastOnFootPosition][0] = 0.0; acstruct[playerid][LastOnFootPosition][1] = 0.0; acstruct[playerid][LastOnFootPosition][2] = 0.0;
acstruct[playerid][checkmaptp] = 0; acstruct[playerid][maptplastclick] = 0;
acstruct[playerid][maptp][0] = 0.0; acstruct[playerid][maptp][1] = 0.0; acstruct[playerid][maptp][2] = 0.0;
for(new x = 0; x < MAX_PLAYERS; x++)
{
ShotPlayer[playerid][x] = 0;
}
for(new s = 0; s < 12; s++) {
PlayerInfo[playerid][pAGuns][s] = 0;
PlayerInfo[playerid][pGuns][s] = 0;
}
for(new s = 0; s < 40; s++) {
ListItemReportId[playerid][s] = -1;
}
for(new s = 0; s < 20; s++) {
ListItemRCPId[playerid][s] = -1;
}
CancelReport[playerid] = -1;
InsideMainMenu{playerid} = 0;
InsideTut{playerid} = 0;
ShowMainMenuGUI(playerid);
SetPlayerJoinCamera(playerid);
ClearChatbox(playerid);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SyncPlayerTime(playerid);
logincheck[playerid] = SetTimerEx("LoginCheck", 120000, 0, "i", playerid);
SetTimerEx("LoginCheckEx", 5000, 0, "i", playerid);
return 1;