SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/09/2012, 04:11 PM   #1
ChristofferHoffmann
Big Clucker
 
Join Date: Dec 2011
Posts: 115
Reputation: 3
Default Games Crashes on Dialogs

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?
ChristofferHoffmann is offline   Reply With Quote
Old 01/09/2012, 04:14 PM   #2
[FR]Fratzica
Little Clucker
 
[FR]Fratzica's Avatar
 
Join Date: Jul 2012
Posts: 42
Reputation: 0
Default Re: Games Crashes on Dialogs

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
__________________
[FR]=Fortza Romaniei!
[FR]Fratzica is offline   Reply With Quote
Old 01/09/2012, 04:16 PM   #3
[LB]BlAcK_DeViL
Huge Clucker
 
[LB]BlAcK_DeViL's Avatar
 
Join Date: Mar 2012
Location: Dubai,United Arab Emirates
Posts: 210
Reputation: 16
Default Re: Games Crashes on Dialogs

rest Your Account And Try To Connect
__________________
[LB]BlAcK_DeViL is offline   Reply With Quote
Old 01/09/2012, 04:26 PM   #4
Lordzy
High-roller
 
Lordzy's Avatar
 
Join Date: Mar 2012
Location: NetherRealm
Posts: 2,698
Reputation: 1177
Default Re: Games Crashes on Dialogs

Post your serverlog.
__________________
Currently inactive - I don't play at any SA-MP servers nor work on anything in PAWN for now. The projects that I've done so far in PAWN, which requires updates will be taking some time.
Lordzy is offline   Reply With Quote
Old 01/09/2012, 04:30 PM   #5
[LB]BlAcK_DeViL
Huge Clucker
 
[LB]BlAcK_DeViL's Avatar
 
Join Date: Mar 2012
Location: Dubai,United Arab Emirates
Posts: 210
Reputation: 16
Default Re: Games Crashes on Dialogs

Yes Thats Good Idea ..Forgot To Say That
__________________
[LB]BlAcK_DeViL is offline   Reply With Quote
Old 01/09/2012, 04:46 PM   #6
ChristofferHoffmann
Big Clucker
 
Join Date: Dec 2011
Posts: 115
Reputation: 3
Default Re: Games Crashes on Dialogs

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.
ChristofferHoffmann is offline   Reply With Quote
Old 01/09/2012, 05:01 PM   #7
[LB]BlAcK_DeViL
Huge Clucker
 
[LB]BlAcK_DeViL's Avatar
 
Join Date: Mar 2012
Location: Dubai,United Arab Emirates
Posts: 210
Reputation: 16
Default Re: Games Crashes on Dialogs

Hmm....
__________________
[LB]BlAcK_DeViL is offline   Reply With Quote
Old 01/09/2012, 06:29 PM   #8
ChristofferHoffmann
Big Clucker
 
Join Date: Dec 2011
Posts: 115
Reputation: 3
Default Re: Games Crashes on Dialogs

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.
ChristofferHoffmann is offline   Reply With Quote
Old 01/09/2012, 07:47 PM   #9
ChristofferHoffmann
Big Clucker
 
Join Date: Dec 2011
Posts: 115
Reputation: 3
Default Re: Games Crashes on Dialogs

Bump. I really hope somebody can help me out, I have absolutely no clue why this should happen without any errors, warnings coming along.
ChristofferHoffmann is offline   Reply With Quote
Old 01/09/2012, 08:20 PM   #10
Stm
Big Clucker
 
Join Date: Dec 2011
Posts: 100
Reputation: 0
Default Re: Games Crashes on Dialogs

Try to replace the crack of the game.This helps me all the time for the exception problem.
Stm is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Game crashes with dialogs leong124 Bug Reports 55 28/10/2016 06:07 AM
Server crashes because of dialogs Kyle_Olsen Help Archive 13 06/08/2011 11:22 PM
My game crashes cause of Dialogs.. Ehab1911 Help Archive 4 22/07/2011 01:01 PM


All times are GMT. The time now is 08:59 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.