Help me ! Wtf is wrong here ?
#1

Код:
	if(dialogid == COMMANDS && response)
	{
        switch(listitem)
        {
	case 0:
	{
	SendClientMessage(playerid, YELLOW, " Asd ");
        SendClientMessage(playerid, YELLOW, " Asd ");
	}
	case 1:
	{
	SendClientMessage(playerid, YELLOW, " Asd ");
        SendClientMessage(playerid, YELLOW, " Asd ");
	}
	case 2: 
	{
	SendClientMessage(playerid, YELLOW, " Asd ");
        SendClientMessage(playerid, YELLOW, " Asd ");
	}
	case 3: 
	{
	SendClientMessage(playerid, YELLOW, " Asd ");
        SendClientMessage(playerid, YELLOW, " Asd ");
	}
	return 1;
	}
Код:
C:\(335) : error 002: only a single statement (or expression) can follow each "case"
C:\(335) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Line 335: return 1;
Reply
#2

Just try "return 0;" on line 335

Worth a try, i dont do much with dialogs and switch, but hay ho
Reply
#3

I tried it . Didn't work .
Reply
#4

pawn Код:
if(dialogid == COMMANDS && response)
{
    switch(listitem) {
        case 0:
        {
            SendClientMessage(playerid, YELLOW, " Asd ");
            SendClientMessage(playerid, YELLOW, " Asd ");
        }
        case 1:
        {
            SendClientMessage(playerid, YELLOW, " Asd ");
            SendClientMessage(playerid, YELLOW, " Asd ");
        }
        case 2:
        {
            SendClientMessage(playerid, YELLOW, " Asd ");
            SendClientMessage(playerid, YELLOW, " Asd ");
        }
        case 3:
        {
            SendClientMessage(playerid, YELLOW, " Asd ");
            SendClientMessage(playerid, YELLOW, " Asd ");
        }
    }
    return 1;
}
Reply
#5

You started the 'switch' function, but didn't close it.
Reply
#6

Thank u all .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)