Help me ! Wtf is wrong here ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me ! Wtf is wrong here ? (
/showthread.php?tid=164926)
Help me ! Wtf is wrong here ? -
Tekto - 02.08.2010
Код:
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;
Re: Help me ! Wtf is wrong here ? -
Ash. - 02.08.2010
Just try "return 0;" on line 335
Worth a try, i dont do much with dialogs and switch, but hay ho
Re: Help me ! Wtf is wrong here ? -
Tekto - 02.08.2010
I tried it . Didn't work .
Re: Help me ! Wtf is wrong here ? -
Conroy - 02.08.2010
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;
}
Re: Help me ! Wtf is wrong here ? -
Hiddos - 02.08.2010
You started the 'switch' function, but didn't close it.
Re: Help me ! Wtf is wrong here ? -
Tekto - 02.08.2010
Thank u all .