Pawno compiler crashes when a new dialog is created.
#1

Hey i have seemed to try everything that i can think of and these are the peices of code that make it crash.
PHP код:
CMD:faction(playeridparams[])
    {
        if(
IsPlayerConnected(playerid))
        {
            
ShowPlayerDialog(playerid999DIALOG_STYLE_LIST"Faction Commands","LSPD\nFBI","Okay","Close");
        }
        return 
1;

and
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
new 
pDialog[512];
if(
response)// They pressed the first button.
    
{
    switch(
dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        
{
        case 
999:// Our dialog!
            
{
               switch(
listitem)// Checking which listitem was selected
            
{
                case 
0:// The first item listed
                
{
                    if(
PlayerInfo[playerid][pMember] == || PlayerInfo[playerid][pLeader] == 1)
                    {
                        
ShowPlayerDialog(playeridHELP6DIALOG_STYLE_MSGBOX"LSPD","/door (/r)adio (/d)epartments (/m)egaphone (/su)spect /lspd /mdc /detain /arrest /wanted /cuff /tazer /showbadge\n/leofrisk /take /ticket (/gov)ernment /deliver /clothes /invite /giverank /deployspikes /deletespike(s)",pDialog,"okay","Close");
                    }
                }
                case 
1// The second item listed
                
{
                    
SendClientMessage(playeridCOLOR_GREEN"FBI to go here.");
                }
            }
            }
    }
    }
    return 
1;

I am really stuck on what to do any help would be awesome!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)