Рекомендованные сообщения



8 posts in this topic

Здравствуйте у меня маленький варнинг помогите ) 

Скрин https://imgur.com/a/RX7fW

C:\Documents and Settings\Admin\Рабочий столой мод Future\gamemodes\new.pwn(11175) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
switch(dialogid)//// Вот Беда !!!!
	    {
	        case 9090:
	        {
	            if(response)
	            {
	                switch(listitem)
	                {

 

Edited by Drummer1993

Share this post


Link to post
Share on other sites

скобки закрывающейся перед switch нет

Share this post


Link to post
Share on other sites
Только что, DEST сказал:

скобки закрывающейся перед switch нет

}
switch(dialogid)//// Вот Беда !!!!
	    {
	        case 9090:
	        {
	            if(response)
	            {
	                switch(listitem)
	                {

Вот так ?

Share this post


Link to post
Share on other sites

@Drummer1993 да. Ну вставил бы уже и проверил, быстрее было бы. 

Share this post


Link to post
Share on other sites
Только что, DEST сказал:

@Drummer1993 да. Ну вставил бы уже и проверил, быстрее было бы. 

вставил вообще не компелируется вот весь диалог 

Цитата

switch(dialogid)
    {
        case 9090:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
                        SetPlayerAttachedObject(playerid,2,19137,2,0.100000,0.000000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдана 'шляпа курицы'");
                        return true;
                    }
                    case 1:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 7);
                        SetPlayerAttachedObject(playerid,2, 19270, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдан 'огонь на голову'");
                        return true;
                    }
                    case 2:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 4);
                        SetPlayerAttachedObject(playerid,2, 18646, 2, 0.111052, 0.021643, -0.000846, 100.280899, 95.500000, 358.071044, 1.800000, 1.283168, 1.200000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдана 'мигалка'");
                        return true;
                    }
                    case 3:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 7);
                        SetPlayerAttachedObject(playerid,2, 19163, 2, 0.111052, 0.021643, -0.000846, 100.280899, 85.752510, 445.071044, 2.000000, 2.100000, 2.100000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдана 'черная маска'");
                        return true;
                    }
                    case 4:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 4);
                        SetPlayerAttachedObject(playerid,2, 3528, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 0.100000, 0.100000, 0.100000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдана 'маска дракона'");
                        return true;
                    }
                    case 5:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 4); RemovePlayerAttachedObject(playerid, 2); RemovePlayerAttachedObject(playerid, 7);
                        SetPlayerAttachedObject(playerid,2, 18643, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.200000, 1.283168, 1.200000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдан 'лазер'");
                        return true;
                    }
                    case 6:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 2)) RemovePlayerAttachedObject(playerid, 2);
                        SetPlayerAttachedObject(playerid,2, 18965, 2, 0.111052, 0.021643, -0.000846, 92.280899, 92.752510, 358.071044, 1.300000, 1.283168, 1.200000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдана 'черная шапка'");
                        return true;
                    }
                    case 7:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 0) || IsPlayerAttachedObjectSlotUsed(playerid, 1) || IsPlayerAttachedObjectSlotUsed(playerid, 2))
                        {
                            RemovePlayerAttachedObject(playerid, 0);
                            RemovePlayerAttachedObject(playerid, 1);
                        }
                        SetPlayerAttachedObject(playerid,0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
                        SetPlayerAttachedObject(playerid,1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдан 'огонь в руки'");
                        return true;
                    }
                    case 8:
                    {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 7)) RemovePlayerAttachedObject(playerid, 7);
                        SetPlayerAttachedObject(playerid,7, 19078, 1, 0.329150, -0.072101, 0.156082, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдан 'попугай'");
                        return true;
                   }
                   case 9:
                   {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
                        SetPlayerAttachedObject(playerid,1,1210,6,0.299999,0.099999,0.000000,0.000000,-83.000000,0.000000,1.000000);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдан 'кейс'");
                        return true;
                   }
                   case 10:
                   {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        if(IsPlayerAttachedObjectSlotUsed(playerid, 0)) RemovePlayerAttachedObject(playerid, 0); RemovePlayerAttachedObject(playerid, 1); RemovePlayerAttachedObject(playerid, 7); RemovePlayerAttachedObject(playerid, 4); RemovePlayerAttachedObject(playerid, 2);
                        SetPlayerAttachedObject(playerid,0, 19078, 1, -1.097527, -0.348305, -0.008029, 0.000000, 0.000000, 0.000000, 8.073966, 8.073966, 8.073966);
                        SendClientMessage(playerid,0xF60000AA,"Вам выдан 'костюм попугая'");
                        return true;
                   }
                   case 11:
                   {
                        new sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        RemovePlayerAttachedObject(playerid, 0);
                        RemovePlayerAttachedObject(playerid, 1);
                        RemovePlayerAttachedObject(playerid, 2);
                        RemovePlayerAttachedObject(playerid, 4);
                        RemovePlayerAttachedObject(playerid, 7);
                        SendClientMessage(playerid,0xF60000AA,"Вы сняли все новогодние обьекты");
                        return true;
                    }
                }
            }
        }
    }
    return 1;

 

 

Share this post


Link to post
Share on other sites

@Drummer1993 что значит 

Только что, Drummer1993 сказал:

вообще не компелируется

 

Share this post


Link to post
Share on other sites

@Drummer1993 если вылетает компилятор, то поставь компилятор от Zex (там исправлена ошибка с вылетами и много чего ещё)

Share this post


Link to post
Share on other sites

C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2431) : error 025: function heading differs from prototype
C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2431) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2442) : error 010: invalid function or declaration
C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2444) : error 025: function heading differs from prototype
C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2444) : error 029: invalid expression, assumed zero
C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2444 -- 2446) : warning 215: expression has no effect
C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2446) : error 001: expected token: ";", but found "if"
C:\Users\Dell\Desktop\Мой мод Future\gamemodes\new.pwn(2446) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Джеймс
      By Джеймс
      Здравствуйте Ув.Участиники PAWNO-RUS,
      Столкнулся с проблемой - *Транспорт сломанный при загрузке на сервер* То есть загружаешь Т.С после покупки с 50% состоянии
      С исправлением затрудняюсь, может вы можете как то помочь.
      Заранее спасибо!