Dialog responce help
#1

pawn Код:
if(dialogid == DIALOG_WEAPONS)
        {
        if(response)
        {
            if(listitem == 0)
            {
             if(PlayerInfo[playerid][pWcreated] <= 0 )
              {
                if(PlayerInfo[playerid][pMats]> 35)
                {
                GivePlayerWeapon(playerid, 1, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 35 materials to create a Brass Knuckles");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 1)
            {
             if(PlayerInfo[playerid][pWcreated] <= 0 )
              {
                if(PlayerInfo[playerid][pMats]> 35)
                {
                GivePlayerWeapon(playerid, 2, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 35 materials to create a Golf Club");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 2)
            {
             if(PlayerInfo[playerid][pWcreated] <= 0 )
              {
                if(PlayerInfo[playerid][pMats]> 40)
                {
                GivePlayerWeapon(playerid, 5, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 40 materials to create a Baseball Bat");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 3)
            {
             if(PlayerInfo[playerid][pWcreated] <= 0 )
              {
                if(PlayerInfo[playerid][pMats]> 45)
                {
                GivePlayerWeapon(playerid, 7, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 45 materials to create a Pool Cue");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 4)
            {
             if(PlayerInfo[playerid][pWcreated] <= 0 )
              {
                if(PlayerInfo[playerid][pMats]> 50)
                {
                GivePlayerWeapon(playerid, 8, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 50 materials to create a Katana");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 5)
            {
             if(PlayerInfo[playerid][pWcreated] <= 50 )
              {
                if(PlayerInfo[playerid][pMats]> 200)
                {
                GivePlayerWeapon(playerid, 22, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 200 materials to create a 9mm");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 6)
            {
             if(PlayerInfo[playerid][pWcreated] <= 50 )
              {
                if(PlayerInfo[playerid][pMats]> 250)
                {
                GivePlayerWeapon(playerid, 23, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 250 materials to create a Silenced 9mm");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 7)
            {
             if(PlayerInfo[playerid][pWcreated] <= 100)
              {
                if(PlayerInfo[playerid][pMats]> 650)
                {
                GivePlayerWeapon(playerid, 25, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 650 materials to create a Shotgun");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 8)
            {
             if(PlayerInfo[playerid][pWcreated] <= 100 )
              {
                if(PlayerInfo[playerid][pMats]> 760)
                {
                GivePlayerWeapon(playerid, 24, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 760 materials to create a Desert Eagle");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 9)
            {
             if(PlayerInfo[playerid][pWcreated] <= 100 )
              {
                if(PlayerInfo[playerid][pMats]> 900)
                {
                GivePlayerWeapon(playerid, 29, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 900 materials to create a MP5");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 10)
            {
             if(PlayerInfo[playerid][pWcreated] <= 150 )
              {
                if(PlayerInfo[playerid][pMats]> 1050)
                {
                GivePlayerWeapon(playerid, 32, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1050 materials to create a Tec9");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 11)
            {
             if(PlayerInfo[playerid][pWcreated] <= 150 )
              {
                if(PlayerInfo[playerid][pMats]> 1250)
                {
                GivePlayerWeapon(playerid, 30, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1250 materials to create an AK47");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 12)
            {
             if(PlayerInfo[playerid][pWcreated] <= 150 )
              {
                if(PlayerInfo[playerid][pMats]> 1340)
                {
                GivePlayerWeapon(playerid, 33, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1340 materials to create a Country Rifle");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 13)
            {
             if(PlayerInfo[playerid][pWcreated] <= 200 )
              {
                if(PlayerInfo[playerid][pMats]> 1520)
                {
                GivePlayerWeapon(playerid, 31, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1520 materials to create a M4");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 14)
            {
             if(PlayerInfo[playerid][pWcreated] <= 200 )
              {
                if(PlayerInfo[playerid][pMats]> 1610 )
                {
                GivePlayerWeapon(playerid, 34, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1610 materials to create a Sniper Rifle");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
            if(listitem == 15)
            {
             if(PlayerInfo[playerid][pWcreated] <=200 )
              {
                if(PlayerInfo[playerid][pMats]> 1780)
                {
                GivePlayerWeapon(playerid, 27, 999999);
                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1780 materials to create a Combat Shotgun");
                PlayerInfo[playerid][pWcreated]++;
                }
                else return SendClientMessage(playerid,-1,"You don't have enough materials");
              }
              else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
            }
        }
        return 1;
    }
i got this errors
pawn Код:
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1092) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1323) : warning 217: loose indentation
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1326) : warning 217: loose indentation
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1326) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1326) : error 004: function "S@@_OnPlayerEnterCheckpoint" is not implemented
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1368) : warning 225: unreachable code
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1368) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1368) : error 017: undefined symbol "cmd_ah"
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1368) : error 029: invalid expression, assumed zero
C:\Users\dell\Desktop\Script\gamemodes\hrp.pwn(1368) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
Lines are
[pawn]
Line 1092 : if(dialogid == DIALOG_WEAPONS)
Line 1326 ublic OnPlayerEnterCheckpoint(playerid)
Line 1368 :CMD:ah(playerid, params[]) return cmd_ahelp(playerid, params);
line 1368+1326 are located under the dialog responce
Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_WEAPONS:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 0 )
                        {
                            if(PlayerInfo[playerid][pMats]> 35)
                            {
                                GivePlayerWeapon(playerid, 1, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 35 materials to create a Brass Knuckles");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 1:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 0 )
                        {
                            if(PlayerInfo[playerid][pMats]> 35)
                            {
                                GivePlayerWeapon(playerid, 2, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 35 materials to create a Golf Club");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 2:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 0 )
                        {
                            if(PlayerInfo[playerid][pMats]> 40)
                            {
                                GivePlayerWeapon(playerid, 5, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 40 materials to create a Baseball Bat");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 3:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 0 )
                        {
                            if(PlayerInfo[playerid][pMats]> 45)
                            {
                                GivePlayerWeapon(playerid, 7, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 45 materials to create a Pool Cue");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 4:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 0 )
                        {
                            if(PlayerInfo[playerid][pMats]> 50)
                            {
                                GivePlayerWeapon(playerid, 8, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 50 materials to create a Katana");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 5:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 50 )
                        {
                            if(PlayerInfo[playerid][pMats]> 200)
                            {
                                GivePlayerWeapon(playerid, 22, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 200 materials to create a 9mm");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 6:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 50 )
                        {
                            if(PlayerInfo[playerid][pMats]> 250)
                            {
                                GivePlayerWeapon(playerid, 23, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 250 materials to create a Silenced 9mm");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 7:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 100)
                        {
                            if(PlayerInfo[playerid][pMats]> 650)
                            {
                                GivePlayerWeapon(playerid, 25, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 650 materials to create a Shotgun");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 8:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 100 )
                        {
                            if(PlayerInfo[playerid][pMats]> 760)
                            {
                                GivePlayerWeapon(playerid, 24, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 760 materials to create a Desert Eagle");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 9:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 100 )
                        {
                            if(PlayerInfo[playerid][pMats]> 900)
                            {
                                GivePlayerWeapon(playerid, 29, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 900 materials to create a MP5");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 10:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 150 )
                        {
                            if(PlayerInfo[playerid][pMats]> 1050)
                            {
                                GivePlayerWeapon(playerid, 32, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1050 materials to create a Tec9");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 11:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 150 )
                        {
                            if(PlayerInfo[playerid][pMats]> 1250)
                            {
                                GivePlayerWeapon(playerid, 30, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1250 materials to create an AK47");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 12:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 150 )
                        {
                            if(PlayerInfo[playerid][pMats]> 1340)
                            {
                                GivePlayerWeapon(playerid, 33, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1340 materials to create a Country Rifle");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 13:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 200 )
                        {
                            if(PlayerInfo[playerid][pMats]> 1520)
                            {
                                GivePlayerWeapon(playerid, 31, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1520 materials to create a M4");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 14:
                    {
                        if(PlayerInfo[playerid][pWcreated] <= 200 )
                        {
                            if(PlayerInfo[playerid][pMats]> 1610 )
                            {
                                GivePlayerWeapon(playerid, 34, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1610 materials to create a Sniper Rifle");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                    case 15:
                    {
                        if(PlayerInfo[playerid][pWcreated] <=200 )
                        {
                            if(PlayerInfo[playerid][pMats]> 1780)
                            {
                                GivePlayerWeapon(playerid, 27, 999999);
                                SendClientMessage(playerid, COLOR_LIGHTBLUE,"You used 1780 materials to create a Combat Shotgun");
                                PlayerInfo[playerid][pWcreated]++;
                            }
                            else return SendClientMessage(playerid,-1,"You don't have enough materials");
                        }
                        else return SendClientMessage(playerid, -1,"Level up then try again,your level doesn't allow you to create this weapon");
                    }
                }
            }
            return 1;
        }
    }
    return 0;
}
Reply
#3

What do you have under this code? any command? show the error lines please..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)