Games Crashes on Dialogs
#1

So, for some reason my game has started to crash on register, log in and so on.

I haven't changed the dialogs, and I have no errors, warnings in my code at all. And it worked fine just before, and now when I start it up it crash. But on other servers with the dialogs, it wont.

Any ideas?
Reply
#2

1. delete your account 2. update the includes you are using 3. try and if it doesnt work show me the code of you gm
Reply
#3

rest Your Account And Try To Connect
Reply
#4

Post your serverlog.
Reply
#5

Yes Thats Good Idea ..Forgot To Say That
Reply
#6

Also, I hope I made it clear that the server does NOT crash, but the game itself does.

Code:
SA-MP 0.3e
Exception At Address: 0x0048C3A9

Registers:
EAX: 0x00000000	EBX: 0x0000FFFF	ECX: 0x0028F1EC	EDX: 0x000000B7
ESI: 0x044691A0	EDI: 0x000004EE	EBP: 0x0028F29C	ESP: 0x0028F170
EFLAGS: 0x00010246

Stack:
+0000: 0x0028F1EC   0x00000000   0x000004EE   0x0028F29C
+0010: 0x00000000   0x0A70D300   0x0CB66178   0x004D6603
+0020: 0x004D6500   0x00000000   0x00000017   0x0A5EDC90
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new string[256];
    if(IsPlayerNPC(playerid))
	{
	    printf("OnDialogResponse: BotKick: %d", playerid);
	    Kick(playerid);
	    return 1;
	}
    if(dialogid == 1) //LOGIN
    {
		if(gPlayerLogged[playerid] == 1)
		{
			SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
			return 1;
		}
		if(response)
		{
		    if(!strlen(inputtext))
		    {
		        DisplayDialogForPlayer(playerid, 1); //login
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter a password.");
				return 1;
			}
			if(strlen(inputtext) >= 50)
			{
			    DisplayDialogForPlayer(playerid, 1); //login
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password is too long.");
				return 0;
			}
	        new tmppass[64];
	        new playername[MAX_PLAYER_NAME];
	        strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
	        GetPlayerName(playerid, playername, sizeof(playername));
			if(strlen(playername) == 3)
			{
			    if(strcmp(playername, "Jay", true) == 0)
			    {
					return 0;
			    }
			    else
			    {
			    	SendClientMessage(playerid, COLOR_LIGHTRED, "Sorry, that name is too short, please change it.");
			    	Kick(playerid);
			    	return 1;
				}
			}
	        Encrypt(tmppass);
	        OnPlayerLogin(playerid,tmppass);
		}
        else
        {
            SendClientMessage(playerid, COLOR_RED, "You decided to leave the server.");
	        Kick(playerid);
        }
    }
    if(dialogid == 2) //REGISTER
    {
        if(gPlayerLogged[playerid] == 1)
		{
			SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
			return 1;
		}
		if(response)
		{
		    if(strlen(inputtext) >= 50)
			{
			    DisplayDialogForPlayer(playerid, 2); //register
				SendClientMessage(playerid, COLOR_WHITE, "SERVER: Password is too long.");
				return 0;
			}
		    new sendername[MAX_PLAYER_NAME];
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new namestring = strfind(sendername, "_", true);
	    	if(namestring == -1)
	  		{
	    		SendClientMessage(playerid, COLOR_YELLOW, "Please choose a roleplay name with the Firstname_Lastname format.");
	      		Kick(playerid);
	      		return 1;
			}
	        if(!ContainsValidCharacters(sendername))
			{
		    	SendClientMessage(playerid,COLOR_YELLOW,"Please choose a roleplay name with the Firstname_Lastname format.");
				Kick(playerid);
				return 1;
			}
			else
			{
			    if(!strlen(inputtext))
		    	{
			        DisplayDialogForPlayer(playerid, 2); //register
					SendClientMessage(playerid, COLOR_WHITE, "SERVER: You must enter a password.");
					return 1;
				}
			    format(string, sizeof(string), "%s.ini", sendername);
                if(fexist(string))
			    {
					SendClientMessage(playerid, COLOR_YELLOW, "That name is already taken, please choose a different one.");
 				    return 1;
				}
				new tmppass[64];
                strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerRegister(playerid,tmppass);
				OnPlayerLogin(playerid,tmppass);
				gPlayerSpawned[playerid] = 1;
				SendClientMessage(playerid, COLOR_YELLOW, "Account registered, you have been logged in automatically.");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You decided to leave the server.");
	        Kick(playerid);
		}
    }
It happens on both login, registration and you name it. I get the exception pasted above the code whenever I try. The server remains fine, and it doesn't seem to react on it at all, it simply states that I left the server.
Reply
#7

Hmm....
Reply
#8

I have no idea what's going on, it doesn't show me ANY problems in my code. But for some reason I keep getting the same exception on Register, Login, Admin Authorization.
Reply
#9

Bump. I really hope somebody can help me out, I have absolutely no clue why this should happen without any errors, warnings coming along.
Reply
#10

Try to replace the crack of the game.This helps me all the time for the exception problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)