Warning-need help
#1

I got this warning

pwn(80837) : warning 217: loose indentation

This dialog problem

Код:
if(dialogid == DIALOGWEAPONS)
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
			{
			    if(GetPlayerMoney(playerid) <20000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
			    SendClientMessage(playerid, COLOR_GREY, "You bought a deagle for 20k!");
			    GivePlayerMoney(playerid, -20000);
			    GivePlayerWeapon(playerid,24, 9999999);
			}
			    case 1:
			{
				if(GetPlayerMoney(playerid) <3000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
				SendClientMessage(playerid, COLOR_GREY, "You bought a shotgun for 3k!");
				GivePlayerMoney(playerid, -3000);
				GivePlayerWeapon(playerid, 25, 9999999);
			}
			    case 2:
			{
				if(GetPlayerMoney(playerid) <5000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
				SendClientMessage(playerid, COLOR_GREY, "You bought an MP5 for 5k!");
				GivePlayerMoney(playerid, -5000);
				GivePlayerWeapon(playerid, 29 ,9999999);
			}
			    case 3:
			{
				if(GetPlayerMoney(playerid) <200000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
				SendClientMessage(playerid, COLOR_GREY, "You bought a spas12 for 200k!");
				GivePlayerMoney(playerid, -200000);
				GivePlayerWeapon(playerid, 27, 9999999);
			}
				case 4:
			{
				if(GetPlayerMoney(playerid) <80000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
				SendClientMessage(playerid, COLOR_GREY, "You bought an Ak-47 for 80k!");
				GivePlayerMoney(playerid, -80000);
				GivePlayerWeapon(playerid,30 ,9999999);
			}
			    case 5:
			{
				if(GetPlayerMoney(playerid) <160000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
				SendClientMessage(playerid, COLOR_GREY, "You bought a M4 for 160k!");
				GivePlayerMoney(playerid, -160000);
				GivePlayerWeapon(playerid, 31, 9999999);
			}
			    case 6:
			{
			    if(GetPlayerMoney(playerid) <250000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");
			    SendClientMessage(playerid, COLOR_GREY, "You bought a sniper for 250k!");
			    GivePlayerMoney(playerid, -250000);
			    GivePlayerWeapon(playerid, 34, 9999999);
			}
			    case 7:
			{
			    if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");

				new Float:armour;
				GetPlayerArmour(playerid, armour);
				if(armour == 100) return SendClientMessage(playerid, COLOR_GREY,"You already have a full vest!");
   				SendClientMessage(playerid, COLOR_GREY, "You bought a half vest for 10k!");
	    		GivePlayerMoney(playerid, -10000);
				SetPlayerArmour(playerid, 50);
			}
			    case 8:
			{
			    if(GetPlayerMoney(playerid) <20000) return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to buy this item!");

				new Float:armour;
				GetPlayerArmour(playerid, armour);
				if(armour == 100) return SendClientMessage(playerid, COLOR_GREY, "You already have a full vest!");
    			SendClientMessage(playerid, COLOR_GREY, "You bought a full vest for 20k!");
       			GivePlayerMoney(playerid, -20000);
		        SetPlayerArmour(playerid, 100);
	        }

			}
			return 1;
			}
		}
Reply
#2

What line is the warning, show it please.
Reply
#3

You need loose indentation in line (80837)
Reply
#4

but it show end of the script but i know this is cause the problem

before i add that wasn't a warning appear,
Reply
#5

Your file.pwn ie less than 80 837 lines?
Reply
#6

Just show us the line!
Reply
#7

more
Reply
#8

Quote:
Originally Posted by ngumcutoi1999
Посмотреть сообщение
You need loose indentation in line (80837)
Really?!



@OP: Just show us the line.
Reply
#9

Quote:
Originally Posted by Red_Dragon.
Посмотреть сообщение
Really?!



@OP: Just show us the line.
What wrong ?
Reply
#10

This line 35 - 36

Код:
if(dialogid == DRINKLISTDIALOG)
	    {
	    if(response)
	    {
			switch(listitem)
			{
			    case 0:
			    {
			        SetPVarString(playerid, "DrinkName", "Beer");
			        SetPVarInt(playerid, "DrinkPrice", 60);
			        SetPVarInt(playerid, "DrinkSpecialAction", SPECIAL_ACTION_DRINK_BEER);
			    }
			    case 1:
			    {
			        SetPVarString(playerid, "DrinkName", "Vodka");
			        SetPVarInt(playerid, "DrinkPrice", 100);
			        SetPVarInt(playerid, "DrinkSpecialAction", SPECIAL_ACTION_DRINK_WINE);
			    }
			    case 2:
			    {
			        SetPVarString(playerid, "DrinkName", "Whiskey");
			        SetPVarInt(playerid, "DrinkPrice", 100);
			        SetPVarInt(playerid, "DrinkSpecialAction", SPECIAL_ACTION_DRINK_WINE);
			    }
			    case 3:
			    {
			        SetPVarString(playerid, "DrinkName", "Water");
			        SetPVarInt(playerid, "DrinkPrice", 20);
			        SetPVarInt(playerid, "DrinkSpecialAction", SPECIAL_ACTION_DRINK_SPRUNK);
			    }
			    case 4:
			    {
			        SetPVarString(playerid, "DrinkName", "Soda");
			        SetPVarInt(playerid, "DrinkPrice", 20);
			        SetPVarInt(playerid, "DrinkSpecialAction", SPECIAL_ACTION_DRINK_SPRUNK);
			    }
			}
			if(GetPlayerCash(playerid) >= GetPVarInt(playerid, "DrinkPrice"))
			{
			    new drinkname[32];
				GetPVarString(playerid, "DrinkName", drinkname, sizeof(drinkname));
			    new drinkprice = GetPVarInt(playerid, "DrinkPrice");
				new dspecialaction = GetPVarInt(playerid, "DrinkSpecialAction");
			    format(string, sizeof(string), "You have asked the bartender for a drink of %s for $%d.  Do you want to tip the bartender?", drinkname, drinkprice);
			    ShowPlayerDialog(playerid, DRINKDIALOG, DIALOG_STYLE_MSGBOX, "Drink Purchase", string, "Yes", "No");
			    format(string, sizeof(string), "* %s pours %s a %s and hands it to them.", GetPlayerNameEx(DrinkOffer[playerid]), GetPlayerNameEx(playerid), drinkname);
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
				format(string, sizeof(string), "* You pour %s a %s, they slide you the money. ($%d)", GetPlayerNameEx(playerid), drinkname, drinkprice );
				SendClientMessageEx(DrinkOffer[playerid], COLOR_LIGHTBLUE, string);
				GivePlayerCash(DrinkOffer[playerid], drinkprice);
				GivePlayerCash(playerid, -drinkprice);
				SetPlayerSpecialAction(playerid, dspecialaction);
				SetPVarInt(playerid, "DrinkCooledDown", 1);

				new ip[32], ipex[32];
				GetPlayerIp(playerid, ip, sizeof(ip));
				GetPlayerIp(DrinkOffer[playerid], ipex, sizeof(ipex));
				DrinkWarn[playerid][DrinkOffer[playerid]] += drinkprice;
				if(DrinkWarn[playerid][DrinkOffer[playerid]] >= 25000 && (PlayerInfo[DrinkOffer[playerid]][pLevel] <= 3 || PlayerInfo[DrinkOffer[playerid]][pLevel] <= 3))
				{
					format(string, sizeof(string), "%s (IP:%s) has tipped %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(DrinkOffer[playerid]), ipex, DrinkWarn[playerid][DrinkOffer[playerid]]);
					Log("logs/pay.log", string);
					ABroadCast(COLOR_YELLOW, string, 2);
				}
			}
			else
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You don't have enough money for this drink!");
			}
	    }
	    else
	    {
	        DrinkOffer[playerid] = INVALID_PLAYER_ID;
	    }
	}
Reply


Forum Jump:


Users browsing this thread: