Help Me Error And Warnings
#1

PHP код:
CMD:color(playerid,params[])
{
    
#pragma unused params
    
ShowPlayerDialog(playerid1DIALOG_STYLE_LIST"{FFFFFF}Choose Your Favorite Color""{FF0000}Red\n{00FFFF}Cyan\n{0000FF}Blue\n{0000A0}Dark Blue\n{ADD8E6}Light Blue\n{800080}Purple\n{FFFF00}Yellow\n{00FF00}Lime\n{FF00FF}Fuchsia\n{FFFFFF}White\n{C0C0C0}Silver White\n{808080}Grey\n{000000}Black\n{FFA500}Orange\n{800000}Maroon\n{008000}Green\n{808000}Olive800000""Choose""Close");
    return 
1;
}
    public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[]) 

        if(
response
        { 
                switch(
dialogid
                { 
                        case 
1// dialog id 
                        

                                switch(
listitem
                                { 
                                    case 
0:SetPlayerColor(playerid0xFF0000);  
                                    case 
1:SetPlayerColor(playerid0x00FFFF);  
                                    case 
2:SetPlayerColor(playerid0x0000FF);  
                                    case 
3:SetPlayerColor(playerid0x0000A0);  
                                    case 
4:SetPlayerColor(playerid0xADD8E6);  
                                    case 
5:SetPlayerColor(playerid0x800080);
                                    case 
6:SetPlayerColor(playerid0xFFFF00);  
                                    case 
7:SetPlayerColor(playerid0x00FF00);  
                                    case 
8:SetPlayerColor(playerid0xFF00FF);  
                                    case 
9:SetPlayerColor(playerid0xFFFFFF);  
                                    case 
10:SetPlayerColor(playerid0xC0C0C0};
                                    case 
11:SetPlayerColor(playerid0x808080);
                                    case 
12:SetPlayerColor(playerid0x000000);
                                    case 
13:SetPlayerColor(playerid0xFFA500);
                                    case 
14:SetPlayerColor(playerid0x800000);
                                    case 
15:SetPlayerColor(playerid0x008000);
                                    case 
15:SetPlayerColor(playerid0x808000);
                            }
                        } 
                } 
        } 
        return 
1
}  
    return 
1;

PHP код:
001    NewColorList    30    "expected token: ",", but found "}""
217    NewColorList    30    "loose indentation"
036    NewColorList    30    "empty statement"
014    NewColorList    31    "invalid statement; not in switch"
215    NewColorList    31    "expression has no effect"
001    NewColorList    31    "expected token: ";", but found ":""
029    NewColorList    31    "invalid expression, assumed zero"
107    NewColorList    31    "too many error messages on one line" 
Lines:
Line 30:
PHP код:
case 10:SetPlayerColor(playerid0xC0C0C0}; 
Line 31:
PHP код:
case 11:SetPlayerColor(playerid0x808080); 
Reply
#2

pawn Код:
case 10:SetPlayerColor(playerid, 0xC0C0C0);
You typed "}" instead of ")".
Reply
#3

Still Got Some Errors
Quote:

040 NewColorList 36 "duplicate "case" label (value 15)"
217 NewColorList 38 "loose indentation"
225 NewColorList 42 "unreachable code"
217 NewColorList 42 "loose indentation"
017 NewColorList 42 "undefined symbol "C""
215 NewColorList 42 "expression has no effect"
001 NewColorList 42 "expected token: ";", but found "-end of file-""

Reply
#4

Ok, one bracket and again return 1;, you have double "15".
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)
    {
        switch(dialogid)
        {
            case 1: // dialog id
            {
                switch(listitem)
                {
                    case 0:SetPlayerColor(playerid, 0xFF0000);
                    case 1:SetPlayerColor(playerid, 0x00FFFF);
                    case 2:SetPlayerColor(playerid, 0x0000FF);
                    case 3:SetPlayerColor(playerid, 0x0000A0);
                    case 4:SetPlayerColor(playerid, 0xADD8E6);
                    case 5:SetPlayerColor(playerid, 0x800080);
                    case 6:SetPlayerColor(playerid, 0xFFFF00);
                    case 7:SetPlayerColor(playerid, 0x00FF00);
                    case 8:SetPlayerColor(playerid, 0xFF00FF);
                    case 9:SetPlayerColor(playerid, 0xFFFFFF);
                    case 10:SetPlayerColor(playerid, 0xC0C0C0);
                    case 11:SetPlayerColor(playerid, 0x808080);
                    case 12:SetPlayerColor(playerid, 0x000000);
                    case 13:SetPlayerColor(playerid, 0xFFA500);
                    case 14:SetPlayerColor(playerid, 0x800000);
                    case 15:SetPlayerColor(playerid, 0x008000);
                    case 16:SetPlayerColor(playerid, 0x808000);
                }
            }
        }
    }
    return 1;
}
Reply
#5

Its Work Thanks Man
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)