Server Problem
#1

Код:
SA-MP Server: 0.3c



Exception At Address: 0x004A2D7B



Registers:

EAX: 0x0012F54C	EBX: 0x017F23EC	ECX: 0x00000000	EDX: 0x00405910

ESI: 0x00000000	EDI: 0x00EBB5D0	EBP: 0x0012F55C	ESP: 0x0012F534

EFLAGS: 0x00010286



Stack:

+0000: 0x00EBB5D0   0x00EBB5D0   0x017F23EC   0xFFFFFFFF

+0010: 0x0012F534   0x0012F158   0x0012F854   0x004A6BC4

+0020: 0x004C1208   0xFFFFFFFF   0x018FA450   0x0040591D

+0030: 0x00000000   0x00401096   0x00EBB5D0   0x01E480D0

+0040: 0x019064B4   0x00402BB3   0x00EBB5D0   0x0000000B

+0050: 0x0012F59C   0x01E480D0   0x00000000   0x00EBB5D0

+0060: 0x0012F638   0x00000002   0x00000000   0x00541C18

+0070: 0x00541C1C   0x005425C0   0x00169CD0   0x00541C28

+0080: 0x00169CD0   0x017F23EC   0x019064B4   0x00000000

+0090: 0x017F0020   0x001140C8   0x00482C12   0x00EBB5D0

+00A0: 0x0012F60C   0x00000054   0x00EBB5D0   0x00000000

+00B0: 0x00EBB5D0   0x0012F610   0x0012F618   0x0012F638

+00C0: 0x01A70178   0x00000000   0x00EA6CD0   0x0012F860

+00D0: 0x012A2010   0x00000000   0x00000001   0x00169CC4

+00E0: 0x0049C298   0x01A70178   0x00000054   0x0012F86C

+00F0: 0x009BAF78   0x36550C01   0x00000000   0x0012F802

+0100: 0x00EBB5D0   0x00006968   0x00000000   0x00000000

+0110: 0x00000000   0x00000000   0x00000000   0x00000000

+0120: 0x00000000   0x00000000   0x00000000   0x00000000

+0130: 0x00000000   0x00000000   0x00000000   0x00000000
Thats what my server does when it crashes .

Some moderator deleted my post for some reason , but i didnt get my response on my problem .
When someone tries to type down something on the chat , the server crashes

NOTE : Even on Commands it Crashed!!


Код:
 OnPlayerText Code
public OnPlayerText(playerid, text[])
{
    RecordPlayerText(playerid,text);
    new namer[24],string[156];
    GetPlayerName(playerid,namer,sizeof(namer));
    format(string,sizeof(string),"13%s[%d] Got Kicked - Reason: Advertising",namer,playerid);
    if(FindIP(text)) { ircSay(EchoConnection,EchoChan,string); return kick4IP(playerid); }


	if(!strcmp( text, "acceot", true))
	{
        if(Accept[playerid] == 0)
        {
            Accept[playerid] = 1;
            SendClientMessage(playerid, COLOR_YAY, ">> Thanks, You have agreed to our rules here, Have Fun!");
            TogglePlayerControllable(playerid, 1);
            TextDrawHideForPlayer(playerid,txtTypeAccept);
            TextDrawHideForPlayer(playerid,txtTypeAccept2);
            TextDrawHideForPlayer(playerid,txtTypeAccept3);
			if(NewlyReg[playerid] == 1)
			{
				new player[30];
				GetPlayerName(playerid,player,30);
                format(string, sizeof(string), "~w~Welcome To ~p~The Server~n~~b~%s~n~~w~Type ~y~/help ~w~, ~w~/rules ~w~or~n~~y~/cmds~w~for more game info", player);
                TextDrawSetString(txtAdminAnnounce,string);
                TextDrawShowForPlayer(playerid,txtAdminAnnounce);
                AdminAnnouncedRNT =10;
			}
        }
	}


    
    if (text[0] == '@')
    {
		if(!IsServerAdmin(playerid))
		{
            SendClientMessage(playerid,COLOR_ADMIN,"Invalid Admin Status");
            return 1;
		}

		if(strlen(text) < 1)
		{
		    SendClientMessage(playerid,COLOR_ADMIN,"Your message must be longer!");
		    return 1;
		}
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, MAX_PLAYER_NAME);
        format(text, 128, "[ADMIN CHAT] %s:%s", name, text[1]);
	    SendClientMessageToAllAdmins(text);
     	ircSay(EchoConnection,EchoChan2,text);
        return 1;
    }
    

    

    
    if(Muted[playerid] == 1)
    {
		return 1;
    }
    
    TextSpammer[playerid] ++;

	if(TextSpammer[playerid] >= 5 && TextSpammer[playerid] <= 7)
	{
		SendClientMessage(playerid,COLOR_RED,SpammerDenied);
		TextSpammer[playerid] --;
		return 1;
	}

	if(TextSpammer[playerid] >= 8)
	{
		Kick(playerid);
		return 1;
	}
   	new PlayerName1[24];
   	new tString[128];
   	new Num[MAX_SERVER_SLOTS] = -1;
   	Num[playerid]=randarg(5,3,10);


	GetPlayerName(playerid, PlayerName1, sizeof(PlayerName1));

    if(IsPlayerNPC(playerid)) return 1;
	if(gTeam[playerid] >= 1 && gTeam[playerid] <= 2 && Undercover[playerid] == 0 && !IsPlayerNPC(playerid))
	{
	    format(tString, sizeof(tString), "12 %s [%d] - %s",PlayerName1,playerid, text);
        ircSay(EchoConnection,EchoChan,tString);
	}
	
	if(gTeam[playerid] >= 1 && gTeam[playerid] <= 2 && Undercover[playerid] == 1 && !IsPlayerNPC(playerid))
	{
	    format(tString, sizeof(tString), "1 %s [%d] - %s",PlayerName1,playerid, text);
        ircSay(EchoConnection,EchoChan,tString);
	}

	if(gTeam[playerid] >= 3 && gTeam[playerid] <= 4 && !IsPlayerNPC(playerid))
	{
 	    format(tString, sizeof(tString), "5 %s [%d] - %s",PlayerName1,playerid, text);
        ircSay(EchoConnection,EchoChan,tString);
	}

	if(gTeam[playerid] >= 5 && !IsPlayerNPC(playerid))
	{
		new Wanted = GetPlayerWantedLevel(playerid);
		if(Wanted >= 0 && Wanted <= 3)
		{
	        format(tString, sizeof(tString), "1 %s [%d] - %s",PlayerName1,playerid, text);
            ircSay(EchoConnection,EchoChan,tString);
        }
		if(Wanted >= 4 && Wanted <= 9&& !IsPlayerNPC(playerid))
		{
	        format(tString, sizeof(tString), "7 %s [%d] - %s",PlayerName1,playerid, text);
            ircSay(EchoConnection,EchoChan,tString);
        }
		if(Wanted >= 10 && !IsPlayerNPC(playerid))
		{
	        format(tString, sizeof(tString), "4 %s [%d] - %s",PlayerName1,playerid, text);
            ircSay(EchoConnection,EchoChan,tString);

        }
	}


	
    for(new d; d<sizeof(Filter); d++)
    

    
    
	if(strfind(text,Filter[d],true) != -1 ) return 1;
	

	
	if(!strcmp( text, "RehaB", true)) // Weps Dealer
    {
        if(IsPlayerInRangeOfPoint(playerid, 3.0, 784.0547,-1131.4712,23.8281))
		{
		    if(gTeam[playerid] <= 2) return SendClientMessage(playerid,COLOR_YELLOW,"PM From RehaB: Hey Officer! Nothing to see here!");

                if(IsThereAnyCopsNearMe(playerid))
				{
					PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
					SendClientMessage(playerid,COLOR_YELLOW,"PM From RehaB: Come back later! There is a Police Officer nearby!");
					ApplyAnimation(GetRehaBID(),"PED","IDLE_CHAT",4.1,0,1,1,0,-1);
					return 1;
				}
			SendClientMessage(playerid,COLOR_YELLOW,"PM From RehaB: Hey! What you want?");
			PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
    		ApplyAnimation(GetRehaBID(),"PED","IDLE_CHAT",4.1,0,1,1,0,-1);
    		ShowPlayerDialog(playerid,DIALOG_REHAB_OPTIONS,2,"Please select an option from below!","Buy Weapons from RehaB\nBuy Drugs from RehaB","Go","Cancel");
			return 1;
		}
	}




    new pname[MAX_PLAYER_NAME+5];
    new pname2[MAX_PLAYER_NAME+5];
    GetPlayerName(playerid,pname,sizeof(pname));
    format(pname2,sizeof(pname2),"%s[%d]",pname,playerid);
    SetPlayerName(playerid,pname2);
    SendPlayerMessageToAll(playerid,text);
    SetPlayerName(playerid,pname);
    return 1;
}
Reply
#2

I'd appreciate if someone can help me with the chat bug (Throughout every possible way , including PMing , msn , yahoo or even posting here) , cause i am losing people for my server which i aim to make one of the top .


Thanks in advance and sorry for double posting!
Reply
#3

You probably have a mistake in your script somewhere around "OnPlayerCommandText" so you might wanna try to reveiw your code over again if a code isn't returning right...I can't give you more details as I don't have the script.

Hope this can help a bit...
Ryder_[AF1]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)