Server crashed upon using command
#1

Server crashed when I use this command. I checked everything, the path, strings commands ... nothing works. Even if I type /maketeam it crashed.

Код:
COMMAND:maketeam(playerid, params[])
{
	if(PlayerInfo[playerid][power] > 1)
	{
		new iPlayer, iRank[64];
		if( sscanf ( params, "us", iPlayer, iRank)) return SCP(playerid, "[PlayerID/PartOfName] [Group Name]");
		if(!IsPlayerConnected(iPlayer)) return SendClientError(playerid, PLAYER_NOT_FOUND);
		new path[256];
	    format(path,sizeof(path),"/Teams/Team-%s.txt",PlayerInfo[iPlayer][playerteamname]);
	    if(dini_Exists(path)) return SendClientError(playerid,"This player is already in a group!");
		new hf[64];
		format(hf,sizeof(hf),"/Teams/Team-%s.txt",iRank);
		if(!dini_Exists(hf))
		{
		    dini_Create(hf);
			dini_Set(hf,"teamname",iRank);
			dini_Set(hf,"owner",PlayerName(iPlayer));
			myStrcpy(PlayerInfo[iPlayer][playerteamname],iRank);
			dUserSet(PlayerName(iPlayer)).("playerteamname",iRank);
			SendClientInfoEx(iPlayer,"Admin has given you the leader position of the group called %s.",iRank);
			SendClientInfoEx(playerid,"You have made %s the leader of the group %s.",PlayerName(iPlayer),iRank);
			PlayerInfo[iPlayer][teamtier]=0;
		    return 1;
		}
		else
		{
		    SendClientError(playerid,"This group name already exists!");
		}
		return 1;
  	}
	return 1;
}
Reply
#2

Install the "crashdetect" plugin : https://sampforum.blast.hk/showthread.php?tid=262796

Re-build your mode with the debug 3 level : https://sampforum.blast.hk/showthread.php?tid=249897

And crash your server using the command. It will show informations in the server console and will print it into the server log.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)