SA-MP Forums Archive
[SOLVED]Errors... - 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: [SOLVED]Errors... (/showthread.php?tid=148360)



[SOLVED]Errors... - TheNuttyScientist - 16.05.2010

C:\Users\Nicola\SA-MP Server Making Kit\filterscripts\Teleports.pwn(127) : error 014: invalid statement; not in switch
C:\Users\Nicola\SA-MP Server Making Kit\filterscripts\Teleports.pwn(127) : warning 215: expression has no effect
C:\Users\Nicola\SA-MP Server Making Kit\filterscripts\Teleports.pwn(127) : error 001: expected token: ";", but found ":"
C:\Users\Nicola\SA-MP Server Making Kit\filterscripts\Teleports.pwn(127) : error 029: invalid expression, assumed zero
C:\Users\Nicola\SA-MP Server Making Kit\filterscripts\Teleports.pwn(127) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

Код:
case 12:



Re: Errors... - juice.j - 16.05.2010

You case in not within the switch brackets, as this:

Код:
switch(val){
//...
}
case 12:



Re: Errors... - TheNuttyScientist - 16.05.2010

I'm sorry, I did not understand.


Re: Errors... - juice.j - 16.05.2010

Your last (?) case, case 12, is not within the brackets -> { } of switch.

Your code does somehow look like this:

Код:
switch(whateverValue){
   case 1: ..
   case 2: ..
}
After you close the switch clause you throw in another "case 12:".

Код:
switch(whateverValue){
   case 1: ..
   case 2: ..
   ...
} // <- switch-case gets closed

case 12: // case 12 is outside the switch code
However it obv. needs to be within the switch brackets.


Re: Errors... - TheNuttyScientist - 16.05.2010

Quote:
Originally Posted by juice.j
Your last (?) case, case 12, is not within the brackets -> { } of switch.

Your code does somehow look like this:

Код:
switch(whateverValue){
   case 1: ..
   case 2: ..
}
This is my code, actually.

Код:
SetPlayerPos(playerid, MOUNTCHILLIAD);
}
case 11:
}
SetPlayerPos(playerid, DONUTSHOP);
}
case 12:
}