Problem z dialogiem 1951 2

O temacie

Autor starcd78

Zaczęty 16.11.2014 roku

Wyświetleń 1951

Odpowiedzi 2

starcd78

starcd78

Użytkownicy
LUJ
posty99
Propsy1
ProfesjaNierób
  • Użytkownicy
  • LUJ

starcd78

Problem z dialogiem
2014-11-16, 20:48(Ostatnia zmiana: 2014-11-18, 15:06)
// ********************************************************
//                best geben
// ********************************************************
instance DIA_Stone_best (C_INFO)
{
   npc          = GTD_3022_Stone;
   nr          = 4;
   condition   = DIA_Stone_best_Condition;
   information   = DIA_Stone_best_Info;
   permanent    = TRUE;
   description = "Możesz mi ulepszyć broń?";
};
func int DIA_Stone_best_Condition ()
{
       if (Npc_KnowsInfo (other, DIA_Stone_OldCamp))
      {
      return TRUE;
   };
};
func void DIA_Stone_best_Info ()
{
   AI_Output (other, self, "DIA_Stone_best_15_01"); //Możesz mi ulepszyć broń?
   AI_Output (self, other, "DIA_Stone_best_04_01"); //Co kokretnie chesz ulepszyć?
   
   Info_ClearChoices (DIA_Stone_best);
   Info_AddChoice (DIA_Stone_best, DIALOG_BACK, DIA_Stone_best_BACK);
   if (Npc_HasItems (other, ItMw_ElBastardo) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj El Bastardo", DIA_Stone_best_bastardo);
   };
   if (Npc_HasItems (other, ItMw_Berserker_Sword) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj miecz berserkera", DIA_Stone_best_berserker);
   };
   if (Npc_HasItems (other, ItMw_WarScythe) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj kosę bojową", DIA_Stone_best_scythe);
   if (Npc_HasItems (other, ItMw_Orkschlaechter) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj orkową zgubę", DIA_Stone_best_ork);
   };
   if (Npc_HasItems (other, ItMw_Drachenschneide) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj smoczą zgubę", DIA_Stone_best_drachen);
   };
   if (Npc_HasItems (other, ItMw_Sturmbringer) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj ostrze burzy", DIA_Stone_best_sturm);

        if (Npc_HasItems (other, ItMw_Schlachtaxt) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj topór wojenny", DIA_Stone_best_schlacht);
   };
   if (Npc_HasItems (other, ItMw_Krummschwert) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj kordelas", DIA_Stone_best_krumm);
   };
   if (Npc_HasItems (other, ItMw_Barbarenstreitaxt) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj barbarzyński topór bojowy", DIA_Stone_best_barbaren);
        if (Npc_HasItems (other, ItMw_Folteraxt) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj katowski topór", DIA_Stone_best_folter);
        };
        if (Npc_HasItems (other, ItMw_Berserkeraxt) > 0)
   {
      Info_AddChoice (DIA_Stone_best, "Daj topór berserkera", DIA_Stone_best_axt);
        };


func void DIA_Stone_best_BACK()
{
   AI_Output (self, other, "DIA_Stone_add_04_24"); //Jak będziesz już miał broń to przynieś ją.
   Info_ClearChoices (DIA_Stone_best);
};
func void DIA_Stone_best_bastardo()
{
   B_GiveInvItems (other, self, ItMw_ElBastardo, 1);
       
};
func void DIA_Stone_best_berserker()
{
   B_GiveInvItems (other, self, ItMw_Berserker_Sword, 1);
     
};
func void DIA_Stone_best_scythe()
{
   B_GiveInvItems (other, self, ItMw_WarScythe, 1);

};
func void DIA_Stone_best_ork()
{
   B_GiveInvItems (other, self, ItMw_Orkschlaechter, 1);
   
};
func void DIA_Stone_best_drachen()
{
   B_GiveInvItems (other, self, ItMw_Drachenschneide, 1);
   
};
func void DIA_Stone_best_sturm()
{
   B_GiveInvItems (other, self, ItMw_Sturmbringer, 1);
   
};
func void DIA_Stone_best_schlacht()
{
   B_GiveInvItems (other, self, ItMw_Schlachtaxt, 1);
   
};
func void DIA_Stone_best_krumm()
{
   B_GiveInvItems (other, self, ItMw_Krummschwert, 1);
   
};
func void DIA_Stone_best_barbaren()
{
   B_GiveInvItems (other, self, ItMw_Barbarenstreitaxt, 1);
   
};
func void DIA_Stone_best_folter()
{
   B_GiveInvItems (other, self, ItMw_Folteraxt, 1);
   
};
func void DIA_Stone_best_axt()
{
   B_GiveInvItems (other, self, ItMw_Berserkeraxt, 1);
   
};


Spacer pisze mi, że mam błąd FUNC; w linijce tej : func void DIA_Stone_best_BACK()
Ja się pytam  dlaczego porównywałem dialogi z innymi postaciami i nie wiem czemu mam błędy  :antyprops:

Pomóżcie mi proszę  :D
 
Keep calm and kill all ~~ Gorn


MajkeI

MajkeI

Użytkownicy
Front End Developer
posty698
Propsy169
Profesjabrak
  • Użytkownicy
  • Front End Developer
Po co to wszystko dajesz do funkcji skoro to tylko jedne linijki B_GiveInvItems ??
Funkcji void używaj jak się powtarza spora część kodu, żeby nie wypisywać wszystkiego za każdym razem.
Jak dajesz dużo kodu to używaj znacznika [ code ] :P

Masz błędy bo masz niepozamykane klamry gdzieniegdzie
 

starcd78

starcd78

Użytkownicy
LUJ
posty99
Propsy1
ProfesjaNierób
  • Użytkownicy
  • LUJ
Spoko, wszystko już działa. Nowy tutaj będę pamiętać o wszystkim :lol2:
Temat do zamknięcia
 
Keep calm and kill all ~~ Gorn



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