Szerző Téma: string lezárás probléma  (Megtekintve 1349 alkalommal)

string lezárás probléma
« Dátum: 2014. november 22. - 15:18:59 »
0 Show voters
helló! van egy módom és ebbe nem jól van lezárva a string és még hozzá itt bedobb egy memoria cimre hivatkozo ablakot valaki segitenne?
   
ClearChatbox(playerid, 10);
       SendClientMessage(playerid, COLOR_RED, \"Rossz válasz!\");
       SendClientMessage(playerid, COLOR_RED, \"Megbuktál a kressz vizsgán, próbáld újra.\");
      TakingLesson[playerid] = 0;
      TogglePlayerControllable(playerid, 1);
      Kresszkerdes[playerid] = 0;
        return 0;
     }
}
}
if(MarriageCeremoney[playerid] > 0)
« Utoljára szerkesztve: 2014. november 22. - 15:21:46 írta Koncz_Norbert »

Elérhető divkn

  • 3259
    • Profil megtekintése
string lezárás probléma
« Válasz #1 Dátum: 2014. november 22. - 15:23:53 »
0 Show voters
Nem látok problémát a bemásolt sorodban.

string lezárás probléma
« Válasz #2 Dátum: 2014. november 22. - 15:25:23 »
0 Show voters
nah itt a kód amivel probálkoztam!
off


bocs hogy nem találom a pwn cod taget ne adj figyelmeztetést pls
 
ezzel probálkoztam
 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 9951)
{
if(listitem == 0)
{
PlayerInfo[playerid][pSex] = 1;
new string[128];
SendClientMessage(playerid, 0xFFFFFFAA, \"Oké,fiú vagy.\");
new maleskin;
maleskin = random(sizeof(CivMalePeds));
SetPlayerSkin(playerid, maleskin);
PlayerInfo[playerid][Civilruha1] = maleskin;
ShowPlayerDialog(playerid,1111,DIALOG_STYLE_INPUT,\"Írd be a korodat!\",\"Írd be a korodat (18-80)\",\"Tovább\",\"Mégsem\");
}
if(listitem == 1)
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, 0xFFFFFFAA, \"Oké,lány vagy.\");
new femaleskin;
femaleskin = random(sizeof(CivFemalePeds));
SetPlayerSkin(playerid, femaleskin);
PlayerInfo[playerid][Civilruha1] = femaleskin;
ShowPlayerDialog(playerid,1111,DIALOG_STYLE_INPUT,\"Írd be a korodat!\",\"Írd be a korodat (18-80)\",\"Tovább\",\"Mégsem\");
}
return 1;
}
if(dialogid == 1111)
{
if(strval(inputtext) < 18 ||strval(inputtext) > 80)
{
ShowPlayerDialog(playerid,1111,DIALOG_STYLE_INPUT,\"Írd be a korodat!\",\"Írd be a korodat (18-80)\",\"Tovább\",\"Mégsem\");
return 0;
}
PlayerInfo[playerid][pAge] = strval(inputtext);
format(string, sizeof(string), \"Rendben, te %d éves vagy.\",inputtext);
SendClientMessage(playerid, COLOR_RED, string);
ShowPlayerDialog(playerid, 2222, DIALOG_STYLE_LIST, \"Hol Szertnél Lakni?\",\"ElQuebradosba\\nLaspaydasba\", \"Elkezd\", \"Mégse\");
return 1;
}
if(dialogid == 2222)
{
if(listitem == 0)
{
PlayerInfo[playerid][pOrigin] = 1;
SendClientMessage(playerid, COLOR_BLUE, \"Rendben, szóval El Quebradosban szeretnél lakni.\");
SendClientMessage(playerid, COLOR_RED, \"Köszönjük hogy megadtad az adataidat.\");
TutTime[playerid] = 1;
RegistrationQuestion[playerid] = 1;
TutTime[playerid] = 1;
TutTime[playerid] = 118;
}
if(listitem == 1)
{
PlayerInfo[playerid][pOrigin] = 2;
SendClientMessage(playerid, COLOR_BLUE, \"Rendben, szóval Las Payasadasban szeretnél lakni.\");
SendClientMessage(playerid, COLOR_RED, \"Köszönjük hogy megadtad az adataidat.\");
TutTime[playerid] = 1;
RegistrationQuestion[playerid] = 1;
TutTime[playerid] = 1;
TutTime[playerid] = 118;
}
return 1;
}
/*if(dialogid == DIALOG_HARC)
{
if(listitem == 0) return SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL), SendClientMessage(playerid, 0x38FF06FF, \"Új harcstílusod: Normál!\");
if(listitem == 1) return SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING), SendClientMessage(playerid, 0x38FF06FF, \"Új harcstílusod: Box!\");
if(listitem == 2) return SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU), SendClientMessage(playerid, 0x38FF06FF, \"Új harcstílusod: Kung Fu!\");
if(listitem == 3) return SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW), SendClientMessage(playerid, 0x38FF06FF, \"Új harcstílusod: Elbow!\");
if(listitem == 4) return SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD), SendClientMessage(playerid, 0x38FF06FF, \"Új harcstílusod: Kneehead!\");
return 1;
}*/
return 0;
}

 
és a régi regisztrációt kivettem

Dupla hozzászólás automatikusan összefûzve. ( [time]2014. November 22. 15:26:55[/time] )

ahogy leforditom a módot memoria cimre hivatkozik amit tudok hogy az azt jelenti meg van nyitva egy string és nem zártam be és csak ezzeket modositottam éss semmit nem látok! :/
« Utoljára szerkesztve: 2014. november 22. - 15:52:16 írta Koncz_Norbert »

Elérhető divkn

  • 3259
    • Profil megtekintése
string lezárás probléma
« Válasz #3 Dátum: 2014. november 22. - 15:50:52 »
0 Show voters

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch (dialogid)
    {
        case 1111:
        {
            new age = strval(inputtext), string[26];
            if (18 <= age <= 80)
            {
                format(string, sizeof(string), \"Rendben, te %d éves vagy.\",age);
                SendClientMessage(playerid, COLOR_RED, string);
                PlayerInfo[playerid][pAge] = age;
                ShowPlayerDialog(playerid, 2222, DIALOG_STYLE_LIST, \"Hol Szertnél Lakni?\",\"ElQuebradosba\\nLaspaydasba\", \"Elkezd\", \"Mégse\");
            }
            else
                ShowPlayerDialog(playerid,1111,DIALOG_STYLE_INPUT,\"Írd be a korodat!\",\"Írd be a korodat (18-80)\",\"Tovább\",\"Mégsem\");
        }
        case 2222:
        {
            if (listitem)
            {
                PlayerInfo[playerid][pOrigin] = 2;
                SendClientMessage(playerid, COLOR_BLUE, \"Rendben, szóval Las Payasadasban szeretnél lakni.\");
                SendClientMessage(playerid, COLOR_RED, \"Köszönjük hogy megadtad az adataidat.\");
            }
            else
            {
                PlayerInfo[playerid][pOrigin] = 1;
                SendClientMessage(playerid, COLOR_BLUE, \"Rendben, szóval El Quebradosban szeretnél lakni.\");
                SendClientMessage(playerid, COLOR_RED, \"Köszönjük hogy megadtad az adataidat.\");
            }
            TutTime[playerid] = 1;
            RegistrationQuestion[playerid] = 1;
            TutTime[playerid] = 1;
            TutTime[playerid] = 118;
        }
        case 9951:
        {
            new skinid = 0;
            if (listitem)
            {
                SendClientMessage(playerid, 0xFFFFFFAA, \"Oké,fiú vagy.\");
                PlayerInfo[playerid][pSex] = 1;
                skinid = CivMalePeds[random(sizeof(CivMalePeds))];
            }
            else
            {
                SendClientMessage(playerid, 0xFFFFFFAA, \"Oké,lány vagy.\");
                PlayerInfo[playerid][pSex] = 2;
                skinid = CivFemalePeds[random(sizeof(CivFemalePeds))];
            }
            SetPlayerSkin(playerid, skinid);
            PlayerInfo[playerid][Civilruha1] = skinid;
            ShowPlayerDialog(playerid,1111,DIALOG_STYLE_INPUT,\"Írd be a korodat!\",\"Írd be a korodat (18-80)\",\"Tovább\",\"Mégsem\");
        }
    }
    return 0;
}
« Utoljára szerkesztve: 2014. november 22. - 16:07:44 írta Koncz_Norbert »

string lezárás probléma
« Válasz #4 Dátum: 2014. november 22. - 16:01:00 »
0 Show voters
Memória cimre hivatkozik így is :S

Dupla hozzászólás automatikusan összefûzve. ( [time]2014. November 22. 16:11:05[/time] )

Valami itt lehet szerintem mert nem hiába dobja be a memória cimre hivatkozást
 
   else if(Kresszkerdes[playerid] == 8)
    {
        new idx;
       tmp = strtok(text, idx);
    if((strcmp(\"2\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"2\")))
   {
       SendClientMessage(playerid, COLOR_GREEN, \"Gratulálunk!\");
      SendClientMessage(playerid, COLOR_GREEN, \"A kressz vizsgát sikeresen letetted!\");
       SendClientMessage(playerid, COLOR_GREEN, \"Mostmár csak a forgalmi és a rutin vizsgát kell tenned, és megkapod a jogsit!\");
      Kresszkerdes[playerid] = 0;
      PlayerInfo[playerid][pKressz] = 1;
      TakingLesson[playerid] = 0;
      TogglePlayerControllable(playerid, 1);
       return 0;
   }
   else
   {
      ClearChatbox(playerid, 10);
       SendClientMessage(playerid, COLOR_RED, \"Rossz válasz!\");
       SendClientMessage(playerid, COLOR_RED, \"Megbuktál a kressz vizsgán, próbáld újra.\");
      TakingLesson[playerid] = 0;
      TogglePlayerControllable(playerid, 1);
      Kresszkerdes[playerid] = 0;
        return 0;
                      }
   }
}
if(MarriageCeremoney[playerid] > 0)
{
    new idx;
    tmp = strtok(text, idx);
    if ((strcmp(\"yes\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"yes\")))
{
    if(GotProposedBy[playerid] < 999)
    {
       if(IsPlayerConnected(GotProposedBy[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
          format(string, sizeof(string), \"Pap: %s do you take %s as your lovely Wife? (type \'yes\', anything else will reject the Marriage).\", giveplayer,sendername);
         SendClientMessage(GotProposedBy[playerid], COLOR_WHITE, string);
         MarriageCeremoney[GotProposedBy[playerid]] = 1;
         MarriageCeremoney[playerid] = 0;
         GotProposedBy[playerid] = 999;
          return 1;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           GotProposedBy[playerid] = 999;
           return 0;
       }
   }
   else if(ProposedTo[playerid] < 999)
   {
       if(IsPlayerConnected(ProposedTo[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
         if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
         {
            format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Wife, you may kiss the Bride.\", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_WHITE, string);
               format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Wife, you may kiss the Groom.\", giveplayer, sendername);
            SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
            format(string, sizeof(string), \"Házasság: We have a new lovely couple, %s & %s have been married.\", sendername, giveplayer);
            OOCNews(COLOR_WHITE, string);
         }
         else if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 1)
         {
             format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Husband, you may kiss the Bride.\", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_WHITE, string);
               format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Husband, you may kiss the Groom.\", giveplayer, sendername);
            SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
            format(string, sizeof(string), \"Házasság: We have a new Gay couple, %s & %s have been married.\", sendername, giveplayer);
            OOCNews(COLOR_WHITE, string);
         }
         else if(PlayerInfo[playerid][pSex] == 2 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
         {
             format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Wife & Wife, you may kiss the Bride.\", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_WHITE, string);
               format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Wife & Wife, you may kiss the Groom.\", giveplayer, sendername);
            SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
            format(string, sizeof(string), \"Házasság: We have a new Lesbian couple, %s & %s have been married.\", sendername, giveplayer);
            OOCNews(COLOR_WHITE, string);
         }
         //MarriageCeremoney[ProposedTo[playerid]] = 1;
         MarriageCeremoney[ProposedTo[playerid]] = 0;
         MarriageCeremoney[playerid] = 0;
         format(string, sizeof(string), \"%s\", sendername);
         strmid(PlayerInfo[ProposedTo[playerid]][pMarriedTo], string, 0, strlen(string), 255);
         format(string, sizeof(string), \"%s\", giveplayer);
         strmid(PlayerInfo[playerid][pMarriedTo], string, 0, strlen(string), 255);
         SafeGivePlayerMoney(playerid, - 20000);
         PlayerInfo[playerid][pMarried] = 1;
         PlayerInfo[ProposedTo[playerid]][pMarried] = 1;
         PlayerInfo[ProposedTo[playerid]][pPhousekey] = PlayerInfo[playerid][pPhousekey];
         PlayerInfo[ProposedTo[playerid]][pPbiskey] = PlayerInfo[playerid][pPbiskey];
         ProposedTo[playerid] = 999;
         MarriageCeremoney[playerid] = 0;
          return 1;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           ProposedTo[playerid] = 999;
           return 0;
       }
   }
}
else
{
    if(GotProposedBy[playerid] < 999)
    {
      if(IsPlayerConnected(GotProposedBy[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
         format(string, sizeof(string), \"* You didn\'t want to Marry %s, no \'yes\' was said.\",giveplayer);
          SendClientMessage(playerid, COLOR_YELLOW, string);
          format(string, sizeof(string), \"* %s did\'t want to Marry you, no \'yes\' was said.\",sendername);
          SendClientMessage(GotProposedBy[playerid], COLOR_YELLOW, string);
          return 0;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           GotProposedBy[playerid] = 999;
           return 0;
       }
    }
    else if(ProposedTo[playerid] < 999)
   {
       if(IsPlayerConnected(ProposedTo[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
         format(string, sizeof(string), \"* You didn\'t want to Marry %s, no \'yes\' was said.\",giveplayer);
          SendClientMessage(playerid, COLOR_YELLOW, string);
          format(string, sizeof(string), \"* %s did\'t want to Marry you, no \'yes\' was said.\",sendername);
          SendClientMessage(ProposedTo[playerid], COLOR_YELLOW, string);
          return 0;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           ProposedTo[playerid] = 999;
           return 0;
       }
   }
}
    return 0;
}
« Utoljára szerkesztve: 2014. november 22. - 16:14:58 írta Koncz_Norbert »

Elérhető divkn

  • 3259
    • Profil megtekintése
string lezárás probléma
« Válasz #5 Dátum: 2014. november 22. - 16:16:48 »
0 Show voters
Lehet, mert látom a 25-26-27 sorban 3 darab kapcsos zárójel van. Vagy csak azért mert rendezetlenül tabulátorozza a kódot.

string lezárás probléma
« Válasz #6 Dátum: 2014. november 22. - 16:21:33 »
0 Show voters
És mit csináljak vele? vagy mi? vagy több kapcsos záró jel kell?

Elérhető divkn

  • 3259
    • Profil megtekintése
string lezárás probléma
« Válasz #7 Dátum: 2014. november 22. - 16:32:59 »
0 Show voters
Másold be az a teljes kódot. Átrendeztem félig, és úgy látszik ott lesz a hiba.

string lezárás probléma
« Válasz #8 Dátum: 2014. november 22. - 16:37:53 »
0 Show voters
ezt vettem ki
 
         TogglePlayerControllable(playerid, 1);
      Kresszkerdes[playerid] = 0;
      return 0;
   }
}
}
if(RegistrationStep[playerid] > 0)
{
    if(RegistrationStep[playerid] == 1)
    {
        new idx;
       tmp = strtok(text, idx);
    if((strcmp(\"fiú\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"fiu\")))
   {
       PlayerInfo[playerid][pSex] = 1;
       SendClientMessage(playerid, COLOR_RED, \"Rendben, szóval fiú vagy.\");
       SendClientMessage(playerid, COLOR_BLUE, \"Hány éves vagy? (pl: 15)\");
       new maleskin;
       maleskin = random(sizeof(CivMalePeds));
       SetPlayerSkin(playerid, maleskin);
       PlayerInfo[playerid][Civilruha1] = maleskin;
       RegistrationStep[playerid] = 2;
       return 0;
   }
   else if((strcmp(\"lány\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"lany\")))
   {
       PlayerInfo[playerid][pSex] = 2;
       SendClientMessage(playerid, COLOR_RED, \"Rendben, szóval lány vagy.\");
       SendClientMessage(playerid, COLOR_BLUE, \"Hány éves vagy? (pl: 15)\");
       new femaleskin;
       femaleskin = random(sizeof(CivFemalePeds));
       SetPlayerSkin(playerid, femaleskin);
       PlayerInfo[playerid][Civilruha1] = femaleskin;
       RegistrationStep[playerid] = 2;
       return 0;
   }
   else
   {
       SendClientMessage(playerid, COLOR_BLUE, \"Nemed? [fiú/lány]\");
   }
   return 0;
}
else if(RegistrationStep[playerid] == 2)
    {
        new age = strvalEx(text);
   if(age < 18 || age > 80)
   {
       SendClientMessage(playerid, COLOR_BLUE, \"korod? [18 - 80 között legyen.]\");
       return 0;
   }
   PlayerInfo[playerid][pAge] = age;
   format(string, sizeof(string), \"Rendben, te %d éves vagy.\",PlayerInfo[playerid][pAge]);
   SendClientMessage(playerid, COLOR_RED, string);
            RegistrationStep[playerid] = 3;
   SendClientMessage(playerid, COLOR_BLUE, \"Hol szeretnél lakni? ([1]EQ [2]LP)\");
   SendClientMessage(playerid, COLOR_BLUE, \"Írj be a név előtt szereplő számot!\");
   return 0;
    }
    else if(RegistrationStep[playerid] == 3)
    {
        new idx;
       tmp = strtok(text, idx);
    if((strcmp(\"1\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"1\")))
   {
       PlayerInfo[playerid][pOrigin] = 1;
       SendClientMessage(playerid, COLOR_BLUE, \"Rendben, szóval El Quebradosban szeretnél lakni.\");
       SendClientMessage(playerid, COLOR_BLUE, \"Köszönjük hogy megadtad az adataidat.\");//, now you will proceed to the Tutorial.\");
       SendClientMessage(playerid, COLOR_RED, \"Mehetsz játszani.\");
      RegistrationStep[playerid] = 0;
             RegistrationStep[playerid] = 0;
       TutTime[playerid] = 1;
       //TutTime[playerid] = 1;
       //TutTime[playerid] = 118;
       return 0;
   }
   else if((strcmp(\"2\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"2\")))
   {
       PlayerInfo[playerid][pOrigin] = 2;
       SendClientMessage(playerid, COLOR_BLUE, \"Rendben, szóval Las Payasadasban szeretnél lakni.\");
       SendClientMessage(playerid, COLOR_BLUE, \"Köszönjük hogy megadtad az adataidat.\");//, now you will proceed to the Tutorial.\");
       SendClientMessage(playerid, COLOR_RED, \"Mehetsz játszani.\");
      RegistrationStep[playerid] = 0;
       RegistrationStep[playerid] = 0;
       TutTime[playerid] = 1;
      RegistrationQuestion[playerid] = 1;
       //TutTime[playerid] = 1;
       //TutTime[playerid] = 118;
       return 0;
   }
   else if((strcmp(\"3\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"2\")))
   {
       PlayerInfo[playerid][pOrigin] = 7;
       SendClientMessage(playerid, COLOR_GREEN, \"Rendben, szóval Fort Carsonban szeretnél lakni.\");
       SendClientMessage(playerid, COLOR_GREEN, \"Köszönjük hogy megadtad az adataidat.\");//, now you will proceed to the Tutorial.\");
       SendClientMessage(playerid, COLOR_RED, \"Most következik az RP teszt.\");
      RegistrationStep[playerid] = 0;
      ClearChatbox(playerid, 2);
      //SendClientMessage(playerid, COLOR_RED, \"Mit jelent az RP vagyis a RolePlay?\");
      //SendClientMessage(playerid, COLOR_WHITE, \"1. Való Élet\");
      //SendClientMessage(playerid, COLOR_WHITE, \"2. Szerepjáték\");
      //SendClientMessage(playerid, COLOR_WHITE, \"3. Nemtudom\");
      //RegistrationQuestion[playerid] = 1;
       //TutTime[playerid] = 1;
       //TutTime[playerid] = 118;
       return 0;
   }
/*else if((strcmp(\"angol\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"angol\")))
   {
       PlayerInfo[playerid][pOrigin] = 3;
       SendClientMessage(playerid, COLOR_YELLOW2, \"Ok, so you are from Asia.\");
       SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Kösz, hogy megadtad az adataid.\");//, now you will proceed to the Tutorial.\");
       SendClientMessage(playerid, COLOR_WHITE, \"Most következik az RP teszt.\");
      RegistrationStep[playerid] = 0;
      ClearChatbox(playerid, 2);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, \">> Használhatsz fegyvert? <<\");
      SendClientMessage(playerid, COLOR_WHITE, \"1. Nem\");
      SendClientMessage(playerid, COLOR_WHITE, \"2. Igen\");
      SendClientMessage(playerid, COLOR_WHITE, \"3. Igen, de Csak DM-re\");
      RegistrationQuestion[playerid] = 1;
       //TutTime[playerid] = 1;
       //TutTime[playerid] = 118;
       return 0;
   }
   else if((strcmp(\"német\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"német\")))
   {
       PlayerInfo[playerid][pOrigin] = 4;
       SendClientMessage(playerid, COLOR_YELLOW2, \"Ok, so you are from Africa.\");
       SendClientMessage(playerid, COLOR_LIGHTBLUE, \"Kösz, hogy megadtad az adataid.\");//, now you will proceed to the Tutorial.\");
       SendClientMessage(playerid, COLOR_WHITE, \"Most következik az RP teszt.\");
      RegistrationStep[playerid] = 0;
      ClearChatbox(playerid, 2);
      SendClientMessage(playerid, COLOR_LIGHTBLUE, \">> Használhatsz fegyvert? <<\");
      SendClientMessage(playerid, COLOR_WHITE, \"1. Nem\");
      SendClientMessage(playerid, COLOR_WHITE, \"2. Igen\");
      SendClientMessage(playerid, COLOR_WHITE, \"3. Igen, de Csak DM-re\");
      RegistrationQuestion[playerid] = 1;
       //TutTime[playerid] = 1;
       //TutTime[playerid] = 118;
       return 0;
   }*/
   else
   {
       SendClientMessage(playerid, COLOR_LIGHTRED, \"Hol szeretnél lakni? ([1]Montgomery)\");
   }
   return 0;
    }
return 0;
}
if(RegistrationQuestion[playerid] > 0)
{
        if(RegistrationQuestion[playerid] == 1)
    {
        new idx;
       tmp = strtok(text, idx);
    if((strcmp(\"2\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"2\")))
   {
       ClearChatbox(playerid, 2);
       SendClientMessage(playerid, COLOR_GREEN, \"Jó Válasz!\");
       ClearChatbox(playerid, 1);
       RegistrationStep[playerid] = 0;
                TutTime[playerid] = 1;
   }
}
}

 

   TogglePlayerControllable(playerid, 1);
      Kresszkerdes[playerid] = 0;
                  return 0;
   }
}
}
if(MarriageCeremoney[playerid] > 0)
{
    new idx;
    tmp = strtok(text, idx);
    if ((strcmp(\"yes\", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen(\"yes\")))
{
    if(GotProposedBy[playerid] < 999)
    {
       if(IsPlayerConnected(GotProposedBy[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
          format(string, sizeof(string), \"Pap: %s do you take %s as your lovely Wife? (type \'yes\', anything else will reject the Marriage).\", giveplayer,sendername);
         SendClientMessage(GotProposedBy[playerid], COLOR_WHITE, string);
         MarriageCeremoney[GotProposedBy[playerid]] = 1;
         MarriageCeremoney[playerid] = 0;
         GotProposedBy[playerid] = 999;
          return 1;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           GotProposedBy[playerid] = 999;
           return 0;
       }
   }
   else if(ProposedTo[playerid] < 999)
   {
       if(IsPlayerConnected(ProposedTo[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
         if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
         {
            format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Wife, you may kiss the Bride.\", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_WHITE, string);
               format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Wife, you may kiss the Groom.\", giveplayer, sendername);
            SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
            format(string, sizeof(string), \"Házasság: We have a new lovely couple, %s & %s have been married.\", sendername, giveplayer);
            OOCNews(COLOR_WHITE, string);
         }
         else if(PlayerInfo[playerid][pSex] == 1 && PlayerInfo[ProposedTo[playerid]][pSex] == 1)
         {
             format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Husband, you may kiss the Bride.\", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_WHITE, string);
               format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Husband & Husband, you may kiss the Groom.\", giveplayer, sendername);
            SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
            format(string, sizeof(string), \"Házasság: We have a new Gay couple, %s & %s have been married.\", sendername, giveplayer);
            OOCNews(COLOR_WHITE, string);
         }
         else if(PlayerInfo[playerid][pSex] == 2 && PlayerInfo[ProposedTo[playerid]][pSex] == 2)
         {
             format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Wife & Wife, you may kiss the Bride.\", sendername, giveplayer);
            SendClientMessage(playerid, COLOR_WHITE, string);
               format(string, sizeof(string), \"Pap: %s and %s i pronounce you now...Wife & Wife, you may kiss the Groom.\", giveplayer, sendername);
            SendClientMessage(ProposedTo[playerid], COLOR_WHITE, string);
            format(string, sizeof(string), \"Házasság: We have a new Lesbian couple, %s & %s have been married.\", sendername, giveplayer);
            OOCNews(COLOR_WHITE, string);
         }
         //MarriageCeremoney[ProposedTo[playerid]] = 1;
         MarriageCeremoney[ProposedTo[playerid]] = 0;
         MarriageCeremoney[playerid] = 0;
         format(string, sizeof(string), \"%s\", sendername);
         strmid(PlayerInfo[ProposedTo[playerid]][pMarriedTo], string, 0, strlen(string), 255);
         format(string, sizeof(string), \"%s\", giveplayer);
         strmid(PlayerInfo[playerid][pMarriedTo], string, 0, strlen(string), 255);
         SafeGivePlayerMoney(playerid, - 20000);
         PlayerInfo[playerid][pMarried] = 1;
         PlayerInfo[ProposedTo[playerid]][pMarried] = 1;
         PlayerInfo[ProposedTo[playerid]][pPhousekey] = PlayerInfo[playerid][pPhousekey];
         PlayerInfo[ProposedTo[playerid]][pPbiskey] = PlayerInfo[playerid][pPbiskey];
         ProposedTo[playerid] = 999;
         MarriageCeremoney[playerid] = 0;
          return 1;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           ProposedTo[playerid] = 999;
           return 0;
       }
   }
}
else
{
    if(GotProposedBy[playerid] < 999)
    {
      if(IsPlayerConnected(GotProposedBy[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(GotProposedBy[playerid], giveplayer, sizeof(giveplayer));
         format(string, sizeof(string), \"* You didn\'t want to Marry %s, no \'yes\' was said.\",giveplayer);
          SendClientMessage(playerid, COLOR_YELLOW, string);
          format(string, sizeof(string), \"* %s did\'t want to Marry you, no \'yes\' was said.\",sendername);
          SendClientMessage(GotProposedBy[playerid], COLOR_YELLOW, string);
          return 0;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           GotProposedBy[playerid] = 999;
           return 0;
       }
    }
    else if(ProposedTo[playerid] < 999)
   {
       if(IsPlayerConnected(ProposedTo[playerid]))
      {
         GetPlayerName(playerid, sendername, sizeof(sendername));
         GetPlayerName(ProposedTo[playerid], giveplayer, sizeof(giveplayer));
         format(string, sizeof(string), \"* You didn\'t want to Marry %s, no \'yes\' was said.\",giveplayer);
          SendClientMessage(playerid, COLOR_YELLOW, string);
          format(string, sizeof(string), \"* %s did\'t want to Marry you, no \'yes\' was said.\",sendername);
          SendClientMessage(ProposedTo[playerid], COLOR_YELLOW, string);
          return 0;
       }
       else
       {
           MarriageCeremoney[playerid] = 0;
           ProposedTo[playerid] = 999;
           return 0;
       }
   }
}
    return 0;
}]

 
illyen lett
« Utoljára szerkesztve: 2014. november 22. - 16:42:25 írta Koncz_Norbert »

Elérhető divkn

  • 3259
    • Profil megtekintése
string lezárás probléma
« Válasz #9 Dátum: 2014. november 22. - 16:45:45 »
0 Show voters
Próbáld meg ezzel a programmal leellenőriztetni a szkriptedet.
http://www.mediafire.com/download/l0em57uec5lcnh6/BracketFix+BETA.rar
Lehet néhány percbe belefog telni míg át nem fut teljesen.

string lezárás probléma
« Válasz #10 Dátum: 2014. november 22. - 17:39:04 »
0 Show voters
Nem jo valaki segit?

Nem elérhető Dfoglalo

  • 4069
  • Globális Moderátor
    • Profil megtekintése
string lezárás probléma
« Válasz #11 Dátum: 2014. november 28. - 19:12:13 »
0 Show voters
[gmod]A témanyitó némítva van és némítás után még multiaccolt is, így a témát zárom.[/gmod]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal