Błąd z dialogiem 2311 3

O temacie

Autor Sauron

Zaczęty 10.04.2012 roku

Wyświetleń 2311

Odpowiedzi 3

Sauron

Sauron

Użytkownicy
posty267
Propsy5
Profesjabrak
  • Użytkownicy
Zrobiłem dialog (ręcznie - bez programu) w który jest kilka opcji wyboru w tym jedna to wybór w wyborze. Jednak w dialogu jest błąd : wrong type DIA_BAU_997_ARON_JOB_GO

Oto dialog:

//*********************************************************************
// Info EXIT
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_EXIT   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 999;
condition   = DIA_BAU_997_Aron_EXIT_Condition;
information = DIA_BAU_997_Aron_EXIT_Info;
permanent   = TRUE;
description = DIALOG_ENDE;
};

FUNC INT DIA_BAU_997_Aron_EXIT_Condition()
{
return TRUE;
};

FUNC VOID DIA_BAU_997_Aron_EXIT_Info()
{
AI_StopProcessInfos (self);
};

//*********************************************************************
// Info Hello
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_Hello   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 4;
condition   = DIA_BAU_997_Aron_Hello_Condition;
information = DIA_BAU_997_Aron_Hello_Info;
permanent   = FALSE;
description = "Kim jesteś?";
};

FUNC INT DIA_BAU_997_Aron_Hello_Condition()
{
return TRUE;
};

FUNC VOID DIA_BAU_997_Aron_Hello_Info()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Hello_15_00"); //Kim jesteś?
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_01_01"); //Aron jestem, a czego chcesz?
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_01_02"); //Jeśli to coś niepotrzebnego to spadaj!

Info_ClearChoices(DIA_BAU_997_Aron_Hello);
Info_AddChoice(DIA_BAU_997_Aron_Hello,"Jak leci?",DIA_BAU_997_Aron_Hello_How);
Info_AddChoice(DIA_BAU_997_Aron_Hello,"Jestem tu nowy",DIA_BAU_997_Aron_Hello_Sorry);

};

FUNC VOID DIA_BAU_997_Aron_Hello_How ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Hello_How_15_00"); //Jak tam?
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_How_01_01"); //A co cię to obchodzi!
};

FUNC VOID DIA_BAU_997_Aron_Hello_Sorry ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Hello_Sorry_15_00"); //Wybacz jestem tu nowy, nie znam tu nikogo.
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_Sorry_01_01"); //Właśnie widać!
};

//*********************************************************************
// Info Job
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_Job   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 4;
condition   = DIA_BAU_997_Aron_Job_Condition;
information = DIA_BAU_997_Aron_Job_Info;
permanent   = FALSE;
description = "Co z tobą?";
};

FUNC INT DIA_BAU_997_Aron_Job_Condition()
{
if (npc_KnowsInfo (other,DIA_BAU_997_Aron_Hello))
{
return TRUE;
};
};


FUNC VOID DIA_BAU_997_Aron_Job_Info()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_15_00"); //Coś taki upierdliwy?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_01_01"); //A w pysk byś nie chciał?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_01_02"); //Mówiłem ci, mów czego ode mnie chcesz, a potem spadaj.

Info_ClearChoices(DIA_BAU_997_Aron_Job);
Info_AddChoice(DIA_BAU_997_Aron_Hello,"Jak leci?",DIA_BAU_997_Aron_Job_go);
Info_AddChoice(DIA_BAU_997_Aron_Job,"Szukam pracy",DIA_BAU_997_Aron_Job_go);
Info_AddChoice(DIA_BAU_997_Aron_Job,"Ty chyba nie wiesz co mówisz",DIA_BAU_997_Aron_Job_smile);
};

FUNC VOID DIA_BAU_997_Aron_Job_go()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_go_15_00"); //Szukam pracy, może masz coś dla mnie?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_go_01_01"); //Dla ciebie?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_go_01_02"); //Hmm... Przynieś mi 10 owczych futer.
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_go_01_03"); //Odpowiada?

Info_ClearChoices(DIA_BAU_997_Aron_Job_go);
Info_AddChoice(DIA_BAU_997_Aron_Job_go,"Zgoda",DIA_BAU_997_Aron_Job_go_Yes);
Info_AddChoice(DIA_BAU_997_Aron_Job_go,"Nie!",DIA_BAU_997_Aron_Job_go_No);

};

FUNC VOID DIA_BAU_997_Aron_Job_go_Yes()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_go_yes_15_00"); //Zgoda
Log_CreateTopic (TOPIC_Aron_Sheep,LOG_MISSION);
Log_SetTopicStatus (TOPIC_Aron_Sheep,LOG_RUNNING);
B_LogEntry (TOPIC_Aron_Sheep, "Aron chcę ode mnię 10 owczych futer.");
AI_StopProcessInfos (self);
};

FUNC VOID DIA_BAU_997_Aron_Job_go_No ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_go_No_15_00"); //Takiemu głupkowi jak ty? Nigdy!
AI_StopProcessInfos (self);
};

FUNC VOID DIA_BAU_997_Aron_Job_smile ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_smile_15_00"); //Ty chyba nie wiesz co mówisz.
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_smile_01_01"); //Ja przynajmniej nie zawracam dupy pierwszemu spotykanemu ubywatelowi!
};


//*********************************************************************
// Info EndJob
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_EndJob   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 4;
condition   = DIA_BAU_997_Aron_EndJob_Condition;
information = DIA_BAU_997_Aron_EndJob_Info;
permanent   = FALSE;
description = "Mam futra";
};

FUNC INT DIA_BAU_997_Aron_EndJob_Condition()
{
if (npc_KnowsInfo (other,DIA_BAU_997_Aron_Job))
&& (Npc_HasItems (other, ItAt_SheepFur) >=10)
{
return TRUE;
};
};

FUNC VOID DIA_BAU_997_Aron_EndJob_Info()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_EndJob_15_00"); //Mam owcze futra.
AI_Output (self ,other,"DIA_BAU_997_Aron_EndJob_01_01"); //Daj je.
AI_Output (other,self ,"DIA_BAU_997_Aron_EndJob_15_03"); //Proszę.
B_GiveInvItems (other, self, ItAt_SheepFur, 10);
AI_Output (self ,other,"DIA_BAU_997_Aron_EndJob_01_04"); //Oto nagroda!
CreateInvItems (self, ItMi_Gold, 200);
    B_GiveInvItems (self, other, ItMi_Gold, 200);
B_GivePlayerXP (200);

B_LogEntry               (TOPIC_Aron_Sheep,"Dałem Aronowi 10 owczych futer.");
    Log_SetTopicStatus       (TOPIC_Aron_Sheep, LOG_SUCCESS);
    MIS_Aron_Sheep = LOG_SUCCESS;
};

// ************************************************************
//   PICK POCKET
// ************************************************************

INSTANCE DIA_Aron_PICKPOCKET (C_INFO)
{
npc = BAU_997_Aron;
nr = 900;
condition = DIA_Aron_PICKPOCKET_Condition;
information = DIA_Aron_PICKPOCKET_Info;
permanent = TRUE;
description = Pickpocket_60;
};                      

FUNC INT DIA_Aron_PICKPOCKET_Condition()
{
C_Beklauen (56, 75);
};
 
FUNC VOID DIA_Aron_PICKPOCKET_Info()
{
Info_ClearChoices (DIA_Aron_PICKPOCKET);
Info_AddChoice (DIA_Aron_PICKPOCKET, DIALOG_BACK ,DIA_Aron_PICKPOCKET_BACK);
Info_AddChoice (DIA_Aron_PICKPOCKET, DIALOG_PICKPOCKET ,DIA_Aron_PICKPOCKET_DoIt);
};

func void DIA_Aron_PICKPOCKET_DoIt()
{
B_Beklauen ();
Info_ClearChoices (DIA_Aron_PICKPOCKET);
};

func void DIA_Aron_PICKPOCKET_BACK()
{
Info_ClearChoices (DIA_Aron_PICKPOCKET);
};

 
Ash nazg durbatulûk, ash nazg gimbatul,
ash nazg thrakatulûk agh burzum-ishi krimpatul.

RafalBudzis

RafalBudzis

Użytkownicy
posty1967
Propsy808
ProfesjaSkrypter
  • Użytkownicy
       Info_ClearChoices(DIA_BAU_997_Aron_Job_go);
        Info_AddChoice(DIA_BAU_997_Aron_Job_go,"Zgoda",DIA_BAU_997_Aron_Job_go_Yes);
        Info_AddChoice(DIA_BAU_997_Aron_Job_go,"Nie!",DIA_BAU_997_Aron_Job_go_No);

1 parametr to instancja dialogu a ty wpisałeś nazwe funkcji zmień na

       Info_ClearChoices(DIA_BAU_997_Aron_Job);//usuwanie poprzedniego choice
        Info_AddChoice(DIA_BAU_997_Aron_Job,"Zgoda",DIA_BAU_997_Aron_Job_go_Yes);
        Info_AddChoice(DIA_BAU_997_Aron_Job,"Nie!",DIA_BAU_997_Aron_Job_go_No);

Sauron

Sauron

Użytkownicy
posty267
Propsy5
Profesjabrak
  • Użytkownicy

Sauron

Błąd z dialogiem
#2 2012-04-10, 13:53(Ostatnia zmiana: 2012-04-10, 16:32)
zmieniłem - dalej to samo

EDIT:Dobra już mam ma być tak:


//*********************************************************************
// Info EXIT
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_EXIT   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 999;
condition   = DIA_BAU_997_Aron_EXIT_Condition;
information = DIA_BAU_997_Aron_EXIT_Info;
permanent   = TRUE;
description = DIALOG_ENDE;
};

FUNC INT DIA_BAU_997_Aron_EXIT_Condition()
{
return TRUE;
};

FUNC VOID DIA_BAU_997_Aron_EXIT_Info()
{
AI_StopProcessInfos (self);
};

//*********************************************************************
// Info Hello
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_Hello   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 4;
condition   = DIA_BAU_997_Aron_Hello_Condition;
information = DIA_BAU_997_Aron_Hello_Info;
permanent   = FALSE;
description = "Kim jesteś?";
};

FUNC INT DIA_BAU_997_Aron_Hello_Condition()
{
return TRUE;
};

FUNC VOID DIA_BAU_997_Aron_Hello_Info()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Hello_15_00"); //Kim jesteś?
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_01_01"); //Aron jestem, a czego chcesz?
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_01_02"); //Jeśli to coś niepotrzebnego to spadaj!

Info_ClearChoices(DIA_BAU_997_Aron_Hello);
Info_AddChoice(DIA_BAU_997_Aron_Hello,"Jak leci?",DIA_BAU_997_Aron_Hello_How);
Info_AddChoice(DIA_BAU_997_Aron_Hello,"Jestem tu nowy",DIA_BAU_997_Aron_Hello_Sorry);

};

FUNC VOID DIA_BAU_997_Aron_Hello_How ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Hello_How_15_00"); //Jak leci?
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_How_01_01"); //A co cię to obchodzi!
};

FUNC VOID DIA_BAU_997_Aron_Hello_Sorry ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Hello_Sorry_15_00"); //Wybacz jestem tu nowy, nie znam tu nikogo.
AI_Output (self ,other,"DIA_BAU_997_Aron_Hello_Sorry_01_01"); //Właśnie widać!
};

//*********************************************************************
// Info Job
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_Job   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 4;
condition   = DIA_BAU_997_Aron_Job_Condition;
information = DIA_BAU_997_Aron_Job_Info;
permanent   = FALSE;
description = "Co z tobą?";
};

FUNC INT DIA_BAU_997_Aron_Job_Condition()
{
if (npc_KnowsInfo (other,DIA_BAU_997_Aron_Hello))
{
return TRUE;
};
};


FUNC VOID DIA_BAU_997_Aron_Job_Info()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_15_00"); //Coś taki upierdliwy?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_01_01"); //A w pysk byś nie chciał?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_01_02"); //Mówiłem ci, mów czego ode mnie chcesz, a potem spadaj.

Info_ClearChoices(DIA_BAU_997_Aron_Job);
Info_AddChoice(DIA_BAU_997_Aron_Job,"Szukam pracy",DIA_BAU_997_Aron_Job_Start);
Info_AddChoice(DIA_BAU_997_Aron_Job,"Ty chyba nie wiesz co mówisz",DIA_BAU_997_Aron_Job_smile);
};

FUNC VOID DIA_BAU_997_Aron_Job_Start ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_Start_15_00"); //Szukam pracy, może masz coś dla mnie?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_Start_01_01"); //Dla ciebie?
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_Start_01_02"); //Hmm... Przynieś mi 10 owczych futer.
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_Start_01_03"); //Odpowiada?

Info_ClearChoices(DIA_BAU_997_Aron_Job);
Info_AddChoice(DIA_BAU_997_Aron_Job,"Zgoda",DIA_BAU_997_Aron_Job_Start_Yes);
Info_AddChoice(DIA_BAU_997_Aron_Job,"Nie!",DIA_BAU_997_Aron_Job_Start_No);
};

FUNC VOID DIA_BAU_997_Aron_Job_smile ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_smile_15_00"); //Ty chyba nie wiesz co mówisz.
AI_Output (self ,other,"DIA_BAU_997_Aron_Job_smile_01_01"); //Ja przynajmniej nie zawracam dupy pierwszemu spotykanemu obywatelowi!
};

FUNC VOID DIA_BAU_997_Aron_Job_Start_Yes ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_Start_Yes_15_00"); //Zdoda.

Log_CreateTopic        (TOPIC_Aron_Sheep, LOG_MISSION);
    Log_SetTopicStatus     (TOPIC_Aron_Sheep, LOG_RUNNING);
    B_LogEntry             (TOPIC_Aron_Sheep,"Aron chcę ode mnie 10 owczych futer.");
AI_StopProcessInfos (self);
};

FUNC VOID DIA_BAU_997_Aron_Job_Start_No ()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_Job_Start_No_15_00"); //Takiemu głupkowi jak ty? Nigdy!
AI_StopProcessInfos (self);
};

//*********************************************************************
// Info EndJob
//*********************************************************************
INSTANCE DIA_BAU_997_Aron_EndJob   (C_INFO)
{
npc         = BAU_997_Aron;
nr          = 4;
condition   = DIA_BAU_997_Aron_EndJob_Condition;
information = DIA_BAU_997_Aron_EndJob_Info;
permanent   = FALSE;
description = "Mam futra";
};

FUNC INT DIA_BAU_997_Aron_EndJob_Condition()
{
if (npc_KnowsInfo (other,DIA_BAU_997_Aron_Job))
&& (Npc_HasItems (other, ItAt_SheepFur) >=10)
{
return TRUE;
};
};

FUNC VOID DIA_BAU_997_Aron_EndJob_Info()
{
AI_Output (other,self ,"DIA_BAU_997_Aron_EndJob_15_00"); //Mam owcze futra.
AI_Output (self ,other,"DIA_BAU_997_Aron_EndJob_01_01"); //Daj je.
AI_Output (other,self ,"DIA_BAU_997_Aron_EndJob_15_03"); //Proszę.
B_GiveInvItems (other, self, ItAt_SheepFur, 10);
AI_Output (self ,other,"DIA_BAU_997_Aron_EndJob_01_04"); //Oto nagroda!
CreateInvItems (self, ItMi_Gold, 200);
    B_GiveInvItems (self, other, ItMi_Gold, 200);
B_GivePlayerXP (200);

B_LogEntry               (TOPIC_Aron_Sheep,"Dałem Aronowi 10 owczych futer.");
    Log_SetTopicStatus       (TOPIC_Aron_Sheep, LOG_SUCCESS);
    MIS_Aron_Sheep = LOG_SUCCESS;
};

// ************************************************************
//   PICK POCKET
// ************************************************************

INSTANCE DIA_Aron_PICKPOCKET (C_INFO)
{
npc = BAU_997_Aron;
nr = 900;
condition = DIA_Aron_PICKPOCKET_Condition;
information = DIA_Aron_PICKPOCKET_Info;
permanent = TRUE;
description = Pickpocket_60;
};                      

FUNC INT DIA_Aron_PICKPOCKET_Condition()
{
C_Beklauen (56, 75);
};
 
FUNC VOID DIA_Aron_PICKPOCKET_Info()
{
Info_ClearChoices (DIA_Aron_PICKPOCKET);
Info_AddChoice (DIA_Aron_PICKPOCKET, DIALOG_BACK ,DIA_Aron_PICKPOCKET_BACK);
Info_AddChoice (DIA_Aron_PICKPOCKET, DIALOG_PICKPOCKET ,DIA_Aron_PICKPOCKET_DoIt);
};

func void DIA_Aron_PICKPOCKET_DoIt()
{
B_Beklauen ();
Info_ClearChoices (DIA_Aron_PICKPOCKET);
};

func void DIA_Aron_PICKPOCKET_BACK()
{
Info_ClearChoices (DIA_Aron_PICKPOCKET);
};



Tylko, że "Zgoda" lub "Nie" mówi tak jakby ostrzerzenie (na czerwono na dole ekranu). Dlaczego???

EDIT: Dobra dodałem po linijce i działa. Temat do zamknięcia
 
Ash nazg durbatulûk, ash nazg gimbatul,
ash nazg thrakatulûk agh burzum-ishi krimpatul.

Sauron

Sauron

Użytkownicy
posty267
Propsy5
Profesjabrak
  • Użytkownicy
Temat można zamknąć
 
Ash nazg durbatulûk, ash nazg gimbatul,
ash nazg thrakatulûk agh burzum-ishi krimpatul.


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry