Need help with error:undefined symbol "SetupPlayerForClassSelection"
#3

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Use switch(classid) and for cases do it like
PHP код:
case 0..14// 0,1,2....14
{
    
//code

Don't you have a function SetupPlayerForClassSelection?
You must create it, but i see its useless since you already set the variable
How to add "SetupPlayerForClassSelection" function ?

And I removed
pawn Код:
SetupPlayerForClassSelection(playerid);
SetPlayerTeamFromClass(playerid, classid);
from
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}
and added cases like this , I hope this is what you meant.
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

switch(classid)
    {
                case 0 .. 14:
        {
            gTeam[playerid] = GROVE;
        }
                case 15 .. 20:
                {
            gTeam[playerid] = AZTEC;
                }
        case 21 .. 27:
        {
            gTeam[playerid] = TRIAD;
        }
                case 28 .. 31:
                {
                        gTeam[playerid] = BALLA;
                }
                case 32 .. 35:
                {
                        gTeam[playerid] = VAGOS;
                }
                case 36 .. 41:
                {
                        gTeam[playerid] = RIFFA;
                }
                case 42 .. 50:
                {
                        gTeam[playerid] = ITALI;
                }
                case 51 .. 56:
                {
                        gTeam[playerid] = TRIAD;
                }
    }
but 9 errors on compiling
pawn Код:
C:\Users\User\Desktop\TEST.pwn(124) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(126) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(130) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(134) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(138) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(142) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(146) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(150) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(154) : error 010: invalid function or declaration
C:\Users\User\Desktop\TEST.pwn(339) : warning 203: symbol is never used: "gTeam"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


9 Errors.
Thanks for the fast reply though.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)