how about this?
#1

I'm trying to make 2 teams as it is showed at wiki-samp
https://sampwiki.blast.hk/wiki/PAWN_tutorial


pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    else
    {
        gTeam[playerid] = TEAM_BALLA;
    }
}
    return 1;
}
C:\Users\Onno\Documents\ALLIN1\da\filterscripts\te ams.pwn(55) : error 017: undefined symbol "SetPlayerTeamFromClass"



Reply
#2

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerTeamFromClass(playerid, classid);
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    else
    {
        gTeam[playerid] = TEAM_BALLA;
    }
    return 1;
}
Reply
#3

AHH DAMN


pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerTeamFromClass(playerid, classid);
    return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
return 1;    <--- 70
{
SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
}


C:\Users\Onno\Documents\ALLIN1\da\filterscripts\te ams.pwn(70) : error 010: invalid function or declaration
Reply
#4

check your brackets and try to intend your code, pls


here your code again, just intended, hope you see the mistake
if you use IE, you wont see it intended
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
    if (classid == 0)
    {
        gTeam[playerid] = TEAM_GROVE;
    }
    else
    {
        gTeam[playerid] = TEAM_BALLA;
    }
}

return 1;    <--- 70
{

SetPlayerToTeamColor(playerid)
{
    if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
}
Reply
#5

rofl still got the error...
Reply
#6

Post line 70.
Reply
#7

Quote:
Originally Posted by TheOneThatOwnZ
Post line 70.
see what ♣ ⓐⓢⓢ said
Reply
#8

Quote:
Originally Posted by PANNA
rofl still got the error...
I never said that I fixed the error
I only intend your code
but it looks like you still dont see the problem
I suggeset to remove line 70 and 71
Reply
#9

Quote:
Originally Posted by ♣ ⓐⓢⓢ
Quote:
Originally Posted by PANNA
rofl still got the error...
I never said that I fixed the error
I only intend your code
but it looks like you still dont see the problem
I suggeset to remove line 70 and 71
ohh, you are good



ahh, another one:
if (classid == 0) <----82
{
gTeam[playerid] = TEAM_GROVE;
}

C:\Users\Onno\Documents\ALLIN1\da\filterscripts\te ams.pwn(82) : error 010: invalid function or declaration
Reply
#10

already thought there came no reply's, please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)