[AJUDA] Vehicleid
#1

Mano estou tentando fazer um FS , escolha de cor de veiculo por dialog, mais nao vai dar certo nunca, pq a funзao que estou usando й ChangeVehicleColor , sempre da erro de vehicleid, sabe algum geito ae?

rpt#
Reply
#2

Qual erro dб?
Reply
#3

PHP код:
 C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(49) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(53) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(57) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(61) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(65) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(69) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(73) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(77) : error 017undefined symbol "vehicleid"
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(81) : error 017undefined symbol "vehicleid"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


9 Errors

Linhas sao todas iguais, dps eu iria mudar a cor

PHP код:
ChangeVehicleColor(vehicleid01); 
Isso ocorre por que й escolha em dialog, e na public dialogresponse nao tem vehicleid la em cima e se eu botar da

PHP код:
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(44) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase


1 Error

Reply
#4

pawn Код:
new vehicleid;
Й sу vocк usar uma variбvel global, que vai armazenar o id do carro escolhido.
Com isso vocк vai poder usб-la em qualquer lugar do GM, inclusive no OnDialogResponse.
Reply
#5

Viniborn ja disse tudo. Se vc nao pode usar vehicleid, cria uma variavel global para substituir, aih o ondialogresponse para de gerar erro.
Reply
#6

PHP код:
C:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(43) : error 025: function heading differs from prototype
C
:\Users\Ana e Felipe\Desktop\FSExemplo.pwn(45) : warning 219local variable "vehicleid" shadows a variable at a preceding level
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase


1 Error

Reply
#7

Troca vehicleid por outro nome.

Ex: VeiculoDialog
Reply
#8

resolvido
Reply
#9

Tenta colocar assim.
pawn Код:
if(dialogid == CARROS)
{
    if(!response)
        return 1;
    else
    {
        switch (listitem)
        {
            case 0:
            {
                ChangeVehicleColor(vehicleid,66,66);
            }
            case 1:
            ...
        }
    }
    return 1;
}
Reply
#10

n funfo ;[
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)