dialogid help
#1

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

  if(dialogid == 12)
  {
  
	if(response)
	{
	
	   switch (12)
	   {
			   case 1:
			   {
				       SetPlayerColor(playerid, Pink);
			   }
			   
			   case 2:
			   {
				       SetPlayerColor(playerid, Grey);
			   }
			   
			  return 1;
        }

	       return 1;
}
PHP код:
C:\Users\John\Desktop\Server\filterscripts\TuNiAdmin.pwn(300) : error 002only a single statement (or expressioncan follow each "case"
C:\Users\John\Desktop\Server\filterscripts\TuNiAdmin.pwn(300) : warning 215expression has no effect
C
:\Users\John\Desktop\Server\filterscripts\TuNiAdmin.pwn(303) : warning 217loose indentation
C
:\Users\John\Desktop\Server\filterscripts\TuNiAdmin.pwn(311) : error 030compound statement not closed at the end of file (started at line 282)
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

Reply
#2

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 12)
    {
        if(response)
        {
            switch (listitem)
            {
                case 0:
                {
                    SetPlayerColor(playerid, Pink);
                }
                case 1:
                {
                    SetPlayerColor(playerid, Grey);
                }
            }
        }
    }
    return 1;
}
Reply
#3

You're missing 2 brackets aswell
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)