[Ajuda] Invalid function or Declaration
#1

Estou fazendo um simples comando com easyDialog, mas estб dando um erro que eu jб tentei resolver de diversas formas (nгo foram todas as formas ¬¬')

Code:
PHP Code:
CMD:oficina(playeridparams[])
{
    new 
vehicleid GetNearestVehicle(playerid);
    if(
PlayerData[playerid][pJob] != JOB_MECHANIC || !IsDoorVehicle(vehicleid))
        return 
SendErrorMessage(playerid"Vocк nгo й um mecвnico ou este veнculo nгo pode ser modificado.");
    if(!
IsPlayerInRangeOfPoint(playerid2.01985.4850,-2148.5571,15.4306))
        return 
SendErrorMessage(playerid"Vocк nгo estб em uma oficina.");
    if(
vehicleid == INVALID_VEHICLE_ID)
        return 
SendErrorMessage(playerid"Vocк nгo estб prуximo de nenhum veнculo.");
    if(
IsPlayerInAnyVehicle(playerid))
        return 
SendErrorMessage(playerid"Vocк deve sair do veнculo primeiro.");
    
Dialog_Show(playeridMechanicOfficeDIALOG_STYLE_TABLIST_HEADERS"Mesa de Trabalho - Mecвnicos""Item\tPreзo (Peзas)\n\
Adicionar Rodas\t260\n\
Adicionar NOS\t30\n\
Reparar Motor\t600\n\
Reparar Lataria\t600\n\
Adicionar som automotivo\t3000\n\
Remover Modificaзхes\tGrбtis\n\
Adicionar Hidrбulica\t200"
"Selecionar""Cancelar");
    return 
1;

Dialog Response
PHP Code:
Dialog:MechanicOffice(playeridresponselistiteminputtext[])
{
    new 
vehicleid GetNearestVehicle(playerid);
    if (
response)
    {
        switch(
listitem)
        {
            case 
0:
                
ShowModelSelectionMenu(playerid"Trocar Rodas"MODEL_SELECTION_WHEELS, {10251073107410751076107710781079108010811082108310841085109610971098}, 170.00.090.0);
            case 
1:
                
AddVehicleComponent(vehicleid1010);
            case 
2:
                
SetVehicleHealth(vehicleid1000);
            case 
3:
                
RepairVehicle(vehicleid);
            case 
4:
                switch(
GetVehicleModel(vehicleid))
                {
                    case 
496:
                    {
                        new 
caixablista CreateObject(2232,0,0,-1000,0,0,0,100);
                        new 
caixablista2 CreateObject(2232,0,0,-1000,0,0,0,100);
                        
AttachObjectToVehicle(caixablistavehicleid0.005000,-1.520000,0.000000,-35.100002,90.539985,0.000000);
                        
AttachObjectToVehicle(caixablista2vehicleid0.005000,-1.520000,0.000000,-145.079940,90.539985,180.899887);
                        
SendClientMessage(playeridCOLOR_CLIENT"INFORMAЗГO: {FFFFFF}Vocк adicionou uma caixa de som ao seu Blista Compact.");
                    }
                    case 
400:
                    {
                        new 
caixalandstal CreateObject(2232,0,0,-1000,0,0,0,100);
                        new 
caixalandstal2 CreateObject(2232,0,0,-1000,0,0,0,100);
                        
AttachObjectToVehicle(caixalandstalvehicleid, -0.094999,-1.575000,0.119999,0.000000,90.359977,0.000001);
                        
AttachObjectToVehicle(caixalandstal2vehicleid, -0.094999,-1.575000,0.119999,0.000000,270.000030,0.180020);
                        
SendClientMessage(playeridCOLOR_CLIENT"INFORMAЗГO: {FFFFFF}Vocк adicionou uma caixa de som ao seu Landstalker.");
                    }
                    case 
404:
                    {
                        new 
caixaperrenial CreateObject(2232,0,0,-1000,0,0,0,100);
                        new 
caixaperrenial2 CreateObject(2232,0,0,-1000,0,0,0,100);
                        
AttachObjectToVehicle(caixaperrenialvehicleid0.000000,-2.060000,0.215000,0.000000,90.179985,0.000000);
                        
AttachObjectToVehicle(caixaperrenial2vehicleid0.000000,-2.060000,0.215000,0.000000,-90.719985,0.000000);
                        
SendClientMessage(playeridCOLOR_CLIENT"INFORMAЗГO: {FFFFFF}Vocк adicionou uma caixa de som ao seu Perrenial.");
                    }
                    default:
                    {
                        
SendErrorMessage(playerid"Este veнculo nгo suporta uma caixa de som.");
                    }
                }
                
                case 
5:
                {
                    new 
Float:XFloat:YFloat:Z;
                    
GetPlayerPos(playeridXYZ);
                    
SetPlayerPos(playeridXYZ);
                }
                
                case 
6:
                    
AddVehicleComponent(vehicleid1087);
            }
        }
    }
    return 
1;

O erro se encontra no return 1;
Eu tirei o return 1 e deu erro.
Eu coloquei o return 0 (erro) pra ver o que acontecia, e continuou Invalid Function or Declaration.
Reply
#2

Olб, tente trocar "Dialog_Show" por "ShowPlayerDialog".

Acredito ser isso!

Boa sorte.

Abraзos.
Reply
#3

O Show_Dialog й do easyDialog, amigo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)