[AJUDA] Dialogs
#1

Bom quando eu tento botar o dialog de comprar armas la no pickup, mais eu nao consigo arrumar direito ai da os seguintes erros:
pawn Код:
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(128) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(130) : warning 219: local variable "String" shadows a variable at a preceding level
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(519) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(521) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(523) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(526) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(528) : error 021: symbol already defined: "format"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(531) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(533) : error 021: symbol already defined: "Nome"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(535) : error 021: symbol already defined: "String"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(537) : error 021: symbol already defined: "dini_Create"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(538) : error 021: symbol already defined: "dini_Set"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(539) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(540) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(541) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(542) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(543) : error 021: symbol already defined: "dini_IntSet"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(545) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(547) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(551) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(554) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(556) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(558) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(560) : error 021: symbol already defined: "Nome"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(562) : error 021: symbol already defined: "String"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(566) : error 010: invalid function or declaration
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(568) : error 021: symbol already defined: "Nome"
C:\Users\Ana e Felipe\Desktop\Iniciante.pwn(570) : error 021: symbol already defined: "String"

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


26 Errors.
Codigo:
pawn Код:
if(dialogid == 1425) {
            if(response) {
                if(listitem == 0) {
                    SetPlayerHealth(playerid, 100);
                    GivePlayerMoney(playerid, -1000);
                    return 1;
                }
                if(listitem == 1) {
                    SetPlayerArmour(playerid, 100);
                    GivePlayerMoney(playerid, -1000);
                    return 1;
                }
                if(listitem == 2) {
                    GivePlayerWeapon(playerid, 24, 999);
                    GivePlayerMoney(playerid, -1500);
                    return 1;
                }
                if(listitem == 3) {
                    GivePlayerWeapon(playerid, 22, 999);
                    GivePlayerMoney(playerid, -1500);
                    return 1;
                }
                if(listitem == 4) {
                    GivePlayerWeapon(playerid, 31, 999);
                    GivePlayerMoney(playerid, -2000);
                    return 1;
                }
                if(listitem == 5) {
                    GivePlayerWeapon(playerid, 30, 999);
                    GivePlayerMoney(playerid, -2200);
                    return 1;
                }
                if(listitem == 6) {
                    GivePlayerWeapon(playerid, 4, 999);
                    GivePlayerMoney(playerid, -2500);
                    return 1;
                }
                if(listitem == 7) {
                    GivePlayerWeapon(playerid, 26, 999);
                    GivePlayerMoney(playerid, -3000);
                    return 1;
                }
                if(listitem == 8) {
                    GivePlayerWeapon(playerid, 34, 999);
                    GivePlayerMoney(playerid, -4000);
                    return 1;
                }
                if(listitem == 9) {
                    GivePlayerWeapon(playerid, 10, 999);
                    GivePlayerMoney(playerid, -500);
                    return 1;
                }
                if(listitem == 10) {
                    GivePlayerWeapon(playerid, 28, 999);
                    GivePlayerMoney(playerid, -2300);
                    return 1;
                }
                if(listitem == 11) {
                    GivePlayerWeapon(playerid, 27, 999);
                    GivePlayerMoney(playerid, -3000);
                    return 1;
                }
                if(listitem == 12) {
                    GivePlayerWeapon(playerid, 25, 999);
                    GivePlayerMoney(playerid, -2000);
                    return 1;
                }
                if(listitem == 13) {
                    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
                    GivePlayerMoney(playerid, -8000);
                    return 1;
                }
                return 1;
            }
            return 1;
        }
        return 0;
    }
Espero que alguem me ajude
Reply
#2

PHP код:
if(dialogid == 1425) {
            if(
response) {
                if(
listitem == 0) {
                    
SetPlayerHealth(playerid100);
                    
GivePlayerMoney(playerid, -1000);
                    return 
1;
                }
                if(
listitem == 1) {
                    
SetPlayerArmour(playerid100);
                    
GivePlayerMoney(playerid, -1000);
                    return 
1;
                }
                if(
listitem == 2) {
                    
GivePlayerWeapon(playerid24999);
                    
GivePlayerMoney(playerid, -1500);
                    return 
1;
                }
                if(
listitem == 3) {
                    
GivePlayerWeapon(playerid22999);
                    
GivePlayerMoney(playerid, -1500);
                    return 
1;
                }
                if(
listitem == 4) {
                    
GivePlayerWeapon(playerid31999);
                    
GivePlayerMoney(playerid, -2000);
                    return 
1;
                }
                if(
listitem == 5) {
                    
GivePlayerWeapon(playerid30999);
                    
GivePlayerMoney(playerid, -2200);
                    return 
1;
                }
                if(
listitem == 6) {
                    
GivePlayerWeapon(playerid4999);
                    
GivePlayerMoney(playerid, -2500);
                    return 
1;
                }
                if(
listitem == 7) {
                    
GivePlayerWeapon(playerid26999);
                    
GivePlayerMoney(playerid, -3000);
                    return 
1;
                }
                if(
listitem == 8) {
                    
GivePlayerWeapon(playerid34999);
                    
GivePlayerMoney(playerid, -4000);
                    return 
1;
                }
                if(
listitem == 9) {
                    
GivePlayerWeapon(playerid10999);
                    
GivePlayerMoney(playerid, -500);
                    return 
1;
                }
                if(
listitem == 10) {
                    
GivePlayerWeapon(playerid28999);
                    
GivePlayerMoney(playerid, -2300);
                    return 
1;
                }
                if(
listitem == 11) {
                    
GivePlayerWeapon(playerid27999);
                    
GivePlayerMoney(playerid, -3000);
                    return 
1;
                }
                if(
listitem == 12) {
                    
GivePlayerWeapon(playerid25999);
                    
GivePlayerMoney(playerid, -2000);
                    return 
1;
                }
                if(
listitem == 13) {
                    
SetPlayerSpecialAction(playeridSPECIAL_ACTION_USEJETPACK);
                    
GivePlayerMoney(playerid, -8000);
                    return 
1;
                }
                return 
1;
        }
        return 
0;
    } 
Tenta ae.
Reply
#3

Vocк colocou duas chaves a mais

pawn Код:
if(dialogid == 1425)
{
    if(response)
    {
        if(listitem == 0)
        {
            SetPlayerHealth(playerid, 100);
            GivePlayerMoney(playerid, -1000);
        }
        if(listitem == 1)
        {
            SetPlayerArmour(playerid, 100);
            GivePlayerMoney(playerid, -1000);
        }
        if(listitem == 2)
        {
            GivePlayerWeapon(playerid, 24, 999);
            GivePlayerMoney(playerid, -1500);
        }
        if(listitem == 3)
        {
            GivePlayerWeapon(playerid, 22, 999);
            GivePlayerMoney(playerid, -1500);
        }
        if(listitem == 4)
        {
            GivePlayerWeapon(playerid, 31, 999);
            GivePlayerMoney(playerid, -2000);
        }
        if(listitem == 5)
        {
            GivePlayerWeapon(playerid, 30, 999);
            GivePlayerMoney(playerid, -2200);
        }
        if(listitem == 6)
        {
            GivePlayerWeapon(playerid, 4, 999);
            GivePlayerMoney(playerid, -2500);
        }
        if(listitem == 7)
        {
            GivePlayerWeapon(playerid, 26, 999);
            GivePlayerMoney(playerid, -3000);
        }
        if(listitem == 8)
        {
            GivePlayerWeapon(playerid, 34, 999);
            GivePlayerMoney(playerid, -4000);
        }
        if(listitem == 9)
        {
            GivePlayerWeapon(playerid, 10, 999);
            GivePlayerMoney(playerid, -500);
        }
        if(listitem == 10)
        {
            GivePlayerWeapon(playerid, 28, 999);
            GivePlayerMoney(playerid, -2300);
        }
        if(listitem == 11)
        {
            GivePlayerWeapon(playerid, 27, 999);
            GivePlayerMoney(playerid, -3000);
        }
        if(listitem == 12)
        {
            GivePlayerWeapon(playerid, 25, 999);
            GivePlayerMoney(playerid, -2000);
        }
        if(listitem == 13) {
            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
            GivePlayerMoney(playerid, -8000);
        }
    }
    return 1;
}
Reply
#4

Nгo funcionou.. a do dj bruninho

Obrigado Mittos Ganhou rep
Reply
#5

Obrigado.

PS: Nгo precisa usar muitas return 1; //gilhrp@hotmail.com
Reply
#6

Aff fail, nгo vi que tinha o return 0 e outro return 1 failed!
Reply
#7

Obrigado pelo mesmo geito, por te me ajudado
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)