Dialog issue
#1

something wrong with this dialog that i made for my script can somebody fix the issue or tell me what am doing wrong
it makes the pwn stop working ones i compile it will give rep to the person who helps.

Код:
   if(dialogid == DIALOG_SHOW_HELP)
	{
 		if(response)
	    {
	        switch(listitem)
			{
			    case 0;
			    {
			    	ShowPlayerDialog(playerid, DIALOG_SHOW_HELP, DIALOG_STYLE_LIST,"Account Menu","General Commands\nVehicle\nHelp\nFactions","Select","Close");
			    }
			    case 1;
			    {
  					new string[3500];
					strcat(str, "{FFFFFF} GENERAL: /me /do /s /quitjob /bail /time /togooc /tognewb /pm\n");
			        ShowPlayerDialog(playeid, DIALOG_ACCOUNTSTATS, DIALOG_STYLE_MSGBOX,"General Commands",str,"Okay","Close");
			    }
				case 2;
				{
					strcat(str, "{FFFFFF} VEHICLE: /v /vlock /valarm /mph\n");
					ShowPlayerDialog(playerid, DIALOG_VEHICLELIST, DIALOG_STYLE_MSGBOX,"Vehicle List",str,"Okay","Close");
				}
				case 3;
				{
					strcat(str,"{FFFFFF} /newb /report\n");
					ShowPlayerDialog(playerid, DIALOG_HELPLIST, DIALOG_STYLE_MSGBOX,"Help List",str,"Okay","Close");
				}
				case 4;
				{
				    strcat(str,"{FFFFFF} 1: LSPD | 2: SASD | 3: SFPD | 4: NG | 5: SAFMD\n");
				    strcat(str,"{FFFFFF} 6: PD | 7: TW ");
				    ShowPlayerDialog(playerid, DIALOG_FACTIONLIST, DIALOG_STYLE_MSGBOX,"Faction List",str,"Okay","Close");
				}
			}
		}
		return 1;
	}
Reply
#2

Quote:
Originally Posted by Yves
Посмотреть сообщение
something wrong with this dialog that i made for my script can somebody fix the issue or tell me what am doing wrong
it makes the pwn stop working ones i compile it will give rep to the person who helps.

Код:
   if(dialogid == DIALOG_SHOW_HELP)
	{
 		if(response)
	    {
	        switch(listitem)
			{
			    case 0:
			    {
			    	ShowPlayerDialog(playerid, DIALOG_SHOW_HELP, DIALOG_STYLE_LIST,"Account Menu","General Commands\nVehicle\nHelp\nFactions","Select","Close");
			    }
			    case 1:
			    {
  					new string[3500];
					strcat(str, "{FFFFFF} GENERAL: /me /do /s /quitjob /bail /time /togooc /tognewb /pm\n");
			        ShowPlayerDialog(playeid, DIALOG_ACCOUNTSTATS, DIALOG_STYLE_MSGBOX,"General Commands",str,"Okay","Close");
			    }
				case 2:
				{
					strcat(str, "{FFFFFF} VEHICLE: /v /vlock /valarm /mph\n");
					ShowPlayerDialog(playerid, DIALOG_VEHICLELIST, DIALOG_STYLE_MSGBOX,"Vehicle List",str,"Okay","Close");
				}
				case 3:
				{
					strcat(str,"{FFFFFF} /newb /report\n");
					ShowPlayerDialog(playerid, DIALOG_HELPLIST, DIALOG_STYLE_MSGBOX,"Help List",str,"Okay","Close");
				}
				case 4:
				{
				    strcat(str,"{FFFFFF} 1: LSPD | 2: SASD | 3: SFPD | 4: NG | 5: SAFMD\n");
				    strcat(str,"{FFFFFF} 6: PD | 7: TW ");
				    ShowPlayerDialog(playerid, DIALOG_FACTIONLIST, DIALOG_STYLE_MSGBOX,"Faction List",str,"Okay","Close");
				}
			}
		}
		return 1:
	}
You actually used ";" instead of ":" in your code. Should be fixed now.
Reply
#3

Quote:
Originally Posted by Yves
Посмотреть сообщение
something wrong with this dialog that i made for my script can somebody fix the issue or tell me what am doing wrong
it makes the pwn stop working ones i compile it will give rep to the person who helps.

Код:
   if(dialogid == DIALOG_SHOW_HELP)
	{
 		if(response)
	    {
	        switch(listitem)
			{
			    case 0;
			    {
			    	ShowPlayerDialog(playerid, DIALOG_SHOW_HELP, DIALOG_STYLE_LIST,"Account Menu","General Commands\nVehicle\nHelp\nFactions","Select","Close");
			    }
			    case 1;
			    {
  					new string[3500];
					strcat(str, "{FFFFFF} GENERAL: /me /do /s /quitjob /bail /time /togooc /tognewb /pm\n");
			        ShowPlayerDialog(playeid, DIALOG_ACCOUNTSTATS, DIALOG_STYLE_MSGBOX,"General Commands",str,"Okay","Close");
			    }
				case 2;
				{
					strcat(str, "{FFFFFF} VEHICLE: /v /vlock /valarm /mph\n");
					ShowPlayerDialog(playerid, DIALOG_VEHICLELIST, DIALOG_STYLE_MSGBOX,"Vehicle List",str,"Okay","Close");
				}
				case 3;
				{
					strcat(str,"{FFFFFF} /newb /report\n");
					ShowPlayerDialog(playerid, DIALOG_HELPLIST, DIALOG_STYLE_MSGBOX,"Help List",str,"Okay","Close");
				}
				case 4;
				{
				    strcat(str,"{FFFFFF} 1: LSPD | 2: SASD | 3: SFPD | 4: NG | 5: SAFMD\n");
				    strcat(str,"{FFFFFF} 6: PD | 7: TW ");
				    ShowPlayerDialog(playerid, DIALOG_FACTIONLIST, DIALOG_STYLE_MSGBOX,"Faction List",str,"Okay","Close");
				}
			}
		}
		return 1;
	}
pawn Код:
if(dialogid == DIALOG_SHOW_HELP)
{
    if(response)
    {
        switch(listitem)
        {
            case 0:
            {
                ShowPlayerDialog(playerid, DIALOG_SHOW_HELP, DIALOG_STYLE_LIST,"Account Menu","General Commands\nVehicle\nHelp\nFactions","Select","Close");
            }
            case 1:
            {
                new string[3500];
                strcat(string, "{FFFFFF} GENERAL: /me /do /s /quitjob /bail /time /togooc /tognewb /pm\n");
                ShowPlayerDialog(playeid, DIALOG_ACCOUNTSTATS, DIALOG_STYLE_MSGBOX,"General Commands",string,"Okay","Close");
            }
            case 2:
            {
                strcat(string, "{FFFFFF} VEHICLE: /v /vlock /valarm /mph\n");
                ShowPlayerDialog(playerid, DIALOG_VEHICLELIST, DIALOG_STYLE_MSGBOX,"Vehicle List",string,"Okay","Close");
            }
            case 3:
            {
                strcat(string,"{FFFFFF} /newb /report\n");
                ShowPlayerDialog(playerid, DIALOG_HELPLIST, DIALOG_STYLE_MSGBOX,"Help List",string,"Okay","Close");
            }
            case 4:
            {
                strcat(string,"{FFFFFF} 1: LSPD | 2: SASD | 3: SFPD | 4: NG | 5: SAFMD\n");
                strcat(string,"{FFFFFF} 6: PD | 7: TW ");
                ShowPlayerDialog(playerid, DIALOG_FACTIONLIST, DIALOG_STYLE_MSGBOX,"Faction List",string,"Okay","Close");
            }
        }
    }
    return 1;
}
You made new string and all these dialogs say str, I fixed the whole thing for u, and also besides the cases u used ; instead of :
Reply
#4

thanks fixed my issue how did i missed that part lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)