SA-MP Forums Archive
Error 040 - 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: Error 040 (/showthread.php?tid=92376)



Error 040 - Luisinho - 19.08.2009

I've been getting this error:
Код:
C:\Documents and Settings\Luis Ramos\Desktop\Cops & Robbers\gamemodes\san_fierro.pwn(121) : error 040: duplicate "case" label (value 0)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Here's my code:
Код:
public OnCheckpointEnter(playerid, checkpointid)
{
	switch(checkpointid)
	{
	  case SFPD_ENTRANCE:
	  {
			SetPlayerPos(playerid,246.3825,113.6706,1003.2188);
			SetPlayerInterior(playerid, 10);
			SendClientMessage(playerid, COLOR_MESSAGE, "Welcome to SFPD");
	  }
	  case SFPD_EXIT:
	  {
			SetPlayerPos(playerid,246.3825,113.6706,1003.2188);
			SetPlayerInterior(playerid, 0);
	  }
	}
	return 1;
}
Any help is appreciated...

Thanks,
Luisinho


Re: Error 040 - Correlli - 19.08.2009

And how are SFPD_ENTRANCE and SFPD_EXIT defined? Do they have the same value (example: 0 or 1)?


Re: Error 040 - Luisinho - 19.08.2009

Problem solved, I forgot to change those values.

Thanks a lot!
I really appreciate your help...


Re: Error 040 - Correlli - 19.08.2009

You're welcome.