Class Selection Music
#3

Right, i'm trying a different kinda of class slection code thingy,

Here is my diff pieces of code:

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerClass(playerid, classid);
    SetupPlayerForClassSelection(playerid);
    gPlayerClass[playerid] = classid;
    switch (classid) {
    case 0:
{
    GameTextForPlayer(playerid, "~b~Test Spawn", 500, 3);
    PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
}
    case 1:
{
    GameTextForPlayer(playerid, "~b~Test Spawn Two.", 500, 3);
    PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
}
 }
    return 1;
}
and here is the other parts of it:

pawn Код:
SetupPlayerForClassSelection(playerid)
{
    TogglePlayerControllable(playerid,0)
    SetPlayerPos(playerid, 1498.7487,-945.5091,51.2734);
    SetPlayerCameraPos(playerid, 1502.2191,-943.7787,51.2934);
    SetPlayerCameraLookAt(playerid, 1498.7487,-945.5091,51.2734);
    SetPlayerFacingAngle(playerid,280);
    return 1;
}

SetPlayerClass(playerid, classid)
{
 switch(classid) {

 if (classid == 0)
    {
        pTeam[playerid] = TEAM_PILOT;
    }
  if (classid == 1)
    pTeam[playerid] = TEAM_TEST;
    }
}
and I'm getting the following errors, I've been trying for a while, any ideas?

Код:
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(808) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(818) : error 002: only a single statement (or expression) can follow each "case"
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(818 -- 819) : error 029: invalid expression, assumed zero
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(819) : warning 217: loose indentation
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(820) : error 029: invalid expression, assumed zero
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(823) : error 029: invalid expression, assumed zero
C:\Documents and Settings\*******\Desktop\SA-MP 2.X LocalHost Server\gamemodes\twitchrp.pwn(826) : warning 203: symbol is never used: "PlayerInfo"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Ashley
Reply


Messages In This Thread
Class Selection Music - by CodeSocket - 30.08.2009, 19:27
Re: Class Selection Music - by sidhu123 - 30.08.2009, 19:49
Re: Class Selection Music - by CodeSocket - 30.08.2009, 20:14
Re: Class Selection Music - by Tr1viUm - 30.08.2009, 20:17
Re: Class Selection Music - by CodeSocket - 30.08.2009, 20:31
Re: Class Selection Music - by Jakku - 10.09.2009, 17:48

Forum Jump:


Users browsing this thread: 1 Guest(s)