SA-MP Forums Archive
Need help with some sh!t (+rep) - 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)
+--- Thread: Need help with some sh!t (+rep) (/showthread.php?tid=317096)



Need help with some sh!t (+rep) - trapped1 - 09.02.2012

Код:
public SetPlayerTeamFromClass(playerid, classid)
{
    if(classid == 0 || == 1 || == 2 || == 3) // This line!
    {
         gTeam[playerid] = Bloodz;
    }
    else if(classid == 4 || == 5 || == 6)
    {
        gTeam[playerid] = Front_Yard_Bloodz;
    }
    else if(classid == 7 || == 8 || == 9)
    {
        gTeam[playerid] = Rollin_Heights_Bloodz;
    }
    else if(classid == 10 || == 11 || == 12 || == 13 || == 14 || == 15 || == 16 || == 17)
    {
        gTeam[playerid] = Cripz;
    }
    else if(classid == 18 || == 19 || == 20)
    {
        gTeam[playerid] = Seville_Boulevard_Families;
    }
    else if(classid == 21 || == 22 || == 23)
    {
        gTeam[playerid] = Temple_Drive_Families;
    }
    else if(classid == 24 || == 25 || == 26 || == 27)
    {
        gTeam[playerid] = Varios_Los_Aztecas;
    }
    else if(classid == 28 || == 29 || == 30 || == 31)
    {
        gTeam[playerid] = Los_Santos_Vagos;
    }
    else if(classid == 32 || == 33 || == 34 || == 35)
    {
        gTeam[playerid] = San_Fierro_Rifa;
    }
    else if(classid == 36 || == 37 || == 39 || == 40)
    {
        gTeam[playerid] = Triads;
    }
    else if(classid == 41 || == 42 || == 43 || == 44)
    {
        gTeam[playerid] = Da_Nang_Boys;
    }
    else if(classid == 45 || == 46 || == 47 || == 48)
    {
        gTeam[playerid] = The_Mafia;
    }
}
Код:
error 029: invalid expression, assumed zero



Re: Need help with some sh!t (+rep) - MP2 - 09.02.2012

It must be like this:

pawn Код:
else if(classid == 24 || classid == 25 || classid == 26 || classid == 27)
Also, use [pawn][/pawn] tags, not [code].


Re: Need help with some sh!t (+rep) - trapped1 - 09.02.2012

Thanks mate Idk why I can add you rep sorry mate


Re: Need help with some sh!t (+rep) - MP2 - 09.02.2012

Don't worry, I'm not bothered
A simple thank you suffices.