SA-MP Forums Archive
a little question - 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: a little question (/showthread.php?tid=133791)



a little question - MrIncredible - 13.03.2010

what is this ?
Код:
.pwn(1077) : error 002: only a single statement (or expression) can follow each "case"
the line is
Код:
return 0;
	}



Re: a little question - Finn - 13.03.2010

Post the whole block of code.


Re: a little question - MrIncredible - 13.03.2010

i found it .. thanks anyway


Re: a little question - Correlli - 13.03.2010

Learn how to use the switch/case statement. You can't add any code before case or after case statement.

Wrong examples:
pawn Код:
switch(5)
{
  printf("-1");
  case 0: printf("0");
  case 1: printf("1);
}
pawn Код:
switch(5)
{
  case 0: printf("0");
  case 1: printf("1);
  printf("
-1");
}
Correct example:
pawn Код:
switch(5)
{
  case 0: printf("0");
  case 1: printf("1);
}