what is wrong with this Dialog
#1

I get 26 error's so i think i am missing a bracket or something.


Код:
	if(dialogid == BUYLICENSE)
	{
		if(response == 1)
		{
		    switch(listitem)
		    {
		        case 0:
		        {
					{
      				if(PlayerInfo[playerid][plicencepoints] > 16)
					{
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* There's already a license registered in your name, you may not register another one!.");
					}
					else
					{
					    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations! You've registered a license in the State of San Andreas, watch out while driving!.");
					    PlayerInfo[giveplayerid][pCarLic] = 1;
					}
				}
				case 1:
				{
				    {
				        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* None in stock!.");
					}
				}
				case 2:
				{
				    {
				        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* None in stock!.");
					}
				}
				case 3:
				{
				    {
				        SendClientMessage(playerid, COLOR_LIGHTBLUE, "* None in stock!.");
				    }
				}
			}
		}
	}
note to the people that don't understand what i mean by the 26 error thing when you take a bracket out of your script it will give you 26 errors on spots that are right and have nothing to do with that piece of code.
Reply
#2

pawn Код:
if(dialogid == BUYLICENSE)
{
    if(response == 1)
    {
        switch(listitem)
        {
            case 0:
            {
                if(PlayerInfo[playerid][plicencepoints] > 16)
                {
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* There's already a license registered in your name, you may not register another one!.");
                }
                else
                {
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Congratulations! You've registered a license in the State of San Andreas, watch out while driving!.");
                    PlayerInfo[giveplayerid][pCarLic] = 1;
                }
            }
            case 1:
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* None in stock!.");
            }
            case 2:
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* None in stock!.");
            }
            case 3:
            {
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "* None in stock!.");
            }
        }
    }
}
You also had some uneeded brackets like
pawn Код:
case 1:
{
      {
            SendClientMessage
      }
}
//instead of
case 1:
{
     SendClientmessage
}
Reply
#3

Lol someone beated me, so i deleted my post .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)