SA-MP Forums Archive
4 Errors with my script :/ - 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: 4 Errors with my script :/ (/showthread.php?tid=94597)



4 Errors with my script :/ - CodeSocket - 30.08.2009

Hi,

I'm stuck with the following errors, and I don't have a clue what it means..

Any ideas?
Код:
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(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
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
SetPlayerClass(playerid, classid)
{
    switch(classid) {

    if (classid == 0) //line 118
    { //line 819
    pTeam[playerid] = TEAM_PILOT; //line 20
}
    if (classid == 1)
    pTeam[playerid] = TEAM_TEST; //line 23
}
}
I always get stuck when I get them kinda errors as I don't understand what they means


Re: 4 Errors with my script :/ - Backwardsman97 - 30.08.2009

pawn Код:
SetPlayerClass(playerid, classid)
{
    switch(classid)
    {
        case 0:
        {
            pTeam[playerid] = TEAM_PILOT;
        }
        case 1:
        {
            pTeam[playerid] = TEAM_TEST;
        }
    }
}



Re: 4 Errors with my script :/ - CodeSocket - 30.08.2009

I'm getting the following errors now :/

Код:
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(824) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Code:
pawn Код:
SetPlayerClass(playerid, classid)
{
 switch(classid)
    {
     case 0:
    {
        pTeam[playerid] = TEAM_PILOT; //line 820
        }
    case 1:
        {
         pTeam[playerid] = TEAM_TEST; // line 824
        }
    }
}
Ash.


Re: 4 Errors with my script :/ - Backwardsman97 - 30.08.2009

How do you have TEAM_PILOT defined?