OnPlayerRequestClass Error 002!
#1

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
        switch(classid)
    {
        case 0:
 {
        GameTextForPlayer(playerid, "~g~~h~~h~Grove Street Families", 3000, 4);
        SetPlayerPos(playerid, 2522.1450,-1679.1985,15.4970);
        SetPlayerCameraPos(playerid, 2522.1450,-1679.1985,15.4970);
        SetPlayerFacingAngle(playerid, 90.2208);
        SetPlayerCameraLookAt(playerid, 2522.1450,-1679.1985,15.4970);
        ApplyAnimation(playerid,"DANCING", "dnce_M_b", 4.0, 1, 1, 1, 0, -1);
        }
        case 1:
 {
        GameTextForPlayer(playerid, "~b~POLICE", 3000, 4);
        SetPlayerPos(playerid, 253.2757,77.0573,1003.6406);
        SetPlayerCameraPos(playerid, 253.2757,77.0573,1003.6406);
        SetPlayerFacingAngle(playerid, 90.2208);
        SetPlayerCameraLookAt(playerid, 253.2757,77.0573,1003.6406);
        ApplyAnimation(playerid,"DANCING", "dnce_M_b", 4.0, 1, 1, 1, 0, -1);
  }
        return 1;
   }
Everytime I try to compile I get this error message.
Код:
D:\xxx\prawn\test gta\samp0.3zr4\gamemodes\deb.pwn(73) : error 002: only a single statement (or expression) can follow each "case"
D:\xxx\prawn\test gta\samp0.3zr4\gamemodes\deb.pwn(73) : warning 215: expression has no effect
Reply
#2

You miss bracket.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
        switch(classid)
    {
        case 0:
 {
        GameTextForPlayer(playerid, "~g~~h~~h~Grove Street Families", 3000, 4);
        SetPlayerPos(playerid, 2522.1450,-1679.1985,15.4970);
        SetPlayerCameraPos(playerid, 2522.1450,-1679.1985,15.4970);
        SetPlayerFacingAngle(playerid, 90.2208);
        SetPlayerCameraLookAt(playerid, 2522.1450,-1679.1985,15.4970);
        ApplyAnimation(playerid,"DANCING", "dnce_M_b", 4.0, 1, 1, 1, 0, -1);
        }
        case 1:
 {
        GameTextForPlayer(playerid, "~b~POLICE", 3000, 4);
        SetPlayerPos(playerid, 253.2757,77.0573,1003.6406);
        SetPlayerCameraPos(playerid, 253.2757,77.0573,1003.6406);
        SetPlayerFacingAngle(playerid, 90.2208);
        SetPlayerCameraLookAt(playerid, 253.2757,77.0573,1003.6406);
        ApplyAnimation(playerid,"DANCING", "dnce_M_b", 4.0, 1, 1, 1, 0, -1);
  }
  }
        return 1;
   }
Reply
#3

Quote:
Originally Posted by Thogy
Посмотреть сообщение
You miss bracket.

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
        switch(classid)
    {
        case 0:
 {
        GameTextForPlayer(playerid, "~g~~h~~h~Grove Street Families", 3000, 4);
        SetPlayerPos(playerid, 2522.1450,-1679.1985,15.4970);
        SetPlayerCameraPos(playerid, 2522.1450,-1679.1985,15.4970);
        SetPlayerFacingAngle(playerid, 90.2208);
        SetPlayerCameraLookAt(playerid, 2522.1450,-1679.1985,15.4970);
        ApplyAnimation(playerid,"DANCING", "dnce_M_b", 4.0, 1, 1, 1, 0, -1);
        }
        case 1:
 {
        GameTextForPlayer(playerid, "~b~POLICE", 3000, 4);
        SetPlayerPos(playerid, 253.2757,77.0573,1003.6406);
        SetPlayerCameraPos(playerid, 253.2757,77.0573,1003.6406);
        SetPlayerFacingAngle(playerid, 90.2208);
        SetPlayerCameraLookAt(playerid, 253.2757,77.0573,1003.6406);
        ApplyAnimation(playerid,"DANCING", "dnce_M_b", 4.0, 1, 1, 1, 0, -1);
  }
  }
        return 1;
   }
Hah! I knew that sneaky bastard would hunt me down, thanks! Compiled and everything went smoothly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)