This dialog Crash compiler?
#1

After 4 hours of crying (angry) and debugging i found out the problem of pawno crash

is this dialog:

pawn Код:
if(strcmp("/jobs", cmdtext, true) == 0)
        {
            if(PlayerToPoint(3.0,playerid,362.2191,173.7529,1008.3828))
            {
                new stringx[956];
                format(stringx,sizeof(stringx), "Numele\tOcupatie\
                 \n {9E9E9E}* Arms dealer\t{94CD4B}Traficul de arme\
                 \n {9E9E9E}* Farmer\t{94CD4B}Strвngerea recoltei\
                 \n {9E9E9E}* Detectiv\t{94CD4B}Investigatia\
                 \n {9E9E9E}* Remorcher\t{94CD4B}Ridicг vehicule\
                 \n {9E9E9E}* Electronist\t{94CD4B}Reparг electronice\
                 \n {9E9E9E}* Gunoier\t{94CD4B}Curгtг strгzile\
                 \n {9E9E9E}* Miner\t{94CD4B}Mineazг\
                 \n {9E9E9E}* Chelner\t{94CD4B}Servire pe plajг\
                 \n {9E9E9E}* Conductor\t{94CD4B}Transport pers\
                 \n {9E9E9E}* Trucker\t{94CD4B}Transportг marfг"
); < --- becuase of this one to be more exactly
                ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_TABLIST_HEADERS,"{9E9E9E}Listг slujbe {94CD4B}(10 in total){9E9E9E}",stringx ,"Contract", "Cancel");
                return 1;
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, " Nu esti la primгrie.");
                return 1;
            }
        }
How is possible becuase of 10 rows in dialog to crash?
Reply
#2

There should not be ; in the last array
Reply
#3

Yeah it happened to me before, had to check every line in the script to figure it out,
next time when making a dialog make sure you compile before going into another code, or remember what you've changed.
Reply
#4

The line is too big for the compiler to handle. Also why are you using a PointToPoint function wile you can use the default IsPlayerInRangeOfPoint?

Код:
if (strcmp("/jobs", cmdtext, true) == 0)
{
	if (IsPlayerInRangeOfPoint(playerid, 3.0, 362.2191, 173.7529, 1008.3828))
	{
	    new 
	    	string[500];

		strcat(string, "Numele\tOcupatie");
		strcat(string, "\n{9E9E9E}* Arms dealer\t{94CD4B}Traficul de arme");
		strcat(string, "\n{9E9E9E}* Farmer\t{94CD4B}Strвngerea recoltei");
		strcat(string, "\n{9E9E9E}* Detectiv\t{94CD4B}Investigatia");
		strcat(string, "\n{9E9E9E}* Remorcher\t{94CD4B}Ridicг vehicule");
		strcat(string, "\n{9E9E9E}* Electronist\t{94CD4B}Reparг electronice");
		strcat(string, "\n{9E9E9E}* Gunoier\t{94CD4B}Curгtг strгzile");
		strcat(string, "\n{9E9E9E}* Miner\t{94CD4B}Mineazг");
		strcat(string, "\n{9E9E9E}* Chelner\t{94CD4B}Servire pe plajг");
		strcat(string, "\n{9E9E9E}* Conductor\t{94CD4B}Transport pers");
		strcat(string, "\n{9E9E9E}* Trucker\t{94CD4B}Transportг marfг");

 	  	ShowPlayerDialog(playerid, DIALOG_JOBS, DIALOG_STYLE_TABLIST_HEADERS, "{9E9E9E}Listг slujbe {94CD4B}(10 in total){9E9E9E}", string , "Contract", "Cancel");
	}
	else {
	    SendClientMessage(playerid, COLOR_GRAD2, " Nu esti la primгrie.");
	}

	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)