Jump to content
  • 0

Error


GooD

Question

D:\Role Play Server\Los Santos Role Play\Los Santos Role Play\Los Santos Role Play\gamemodes\gtarp.pwn(2617) : error 017: undefined symbol "newcar"

D:\Role Play Server\Los Santos Role Play\Los Santos Role Play\Los Santos Role Play\gamemodes\gtarp.pwn(2619) : error 017: undefined symbol "playerid"

D:\Role Play Server\Los Santos Role Play\Los Santos Role Play\Los Santos Role Play\gamemodes\gtarp.pwn(2623) : error 017: undefined symbol "playerid"

D:\Role Play Server\Los Santos Role Play\Los Santos Role Play\Los Santos Role Play\gamemodes\gtarp.pwn(2624) : error 017: undefined symbol "playerid"

Liniile:

[pawn]public IsASurenos()

{

if(newcar == surcar1 || newcar == surcar2 || newcar == surcar3 || newcar == surcar4 || newcar == surcar5 || newcar == surcar6 || newcar == surcar7)

{

            if(PlayerInfo[playerid][pMember] == 5 ||PlayerInfo[playerid][pLeader] == 5) { }

    else

{

        SendClientMessage(playerid,COLOR_GREY," Nu esti membru Surenos ");

        RemovePlayerFromVehicle(playerid);

    }

}

}[/pawn]

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

public IsASurenos( playerid, newcar )
{
if(newcar == surcar1 || newcar == surcar2 || newcar == surcar3 || newcar == surcar4 || newcar == surcar5 || newcar == surcar6 || newcar == surcar7)
		{
            if(PlayerInfo[pMember] == 5 ||PlayerInfo[playerid][pLeader] == 5) { }
		    else

			{
		        SendClientMessage(playerid,COLOR_GREY," Nu esti membru Surenos ");
		        RemovePlayerFromVehicle(playerid);
		    }
		}
}

Link to comment
Share on other sites

[pawn]public IsASurenos( playerid )

{

    new newcar = GetPlayerVehicleID ( playerid ) ;

    if(newcar == surcar1 || newcar == surcar2 || newcar == surcar3 || newcar == surcar4 || newcar == surcar5 || newcar == surcar6 || newcar == surcar7)

    {

        if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) { }

else

{

    SendClientMessage(playerid,COLOR_GREY," Nu esti membru Surenos ");

    RemovePlayerFromVehicle(playerid);

}

    }

}[/pawn]

EDIT: Se pare ca Rock a fost mai rapid ca mine. :))

Link to comment
Share on other sites

Multumesc oricum Dark

Si Rock multumesc dar am rezolvat inainte asta.

Ai sus in script la playerinfo ceva de genul?

new PlayerInfo[MAX_PLAYERS][enum];

"enum" - Numele enumeratorului in care sunt variabilele pMember, etc..

Mai am o problema le poate lua oricine..

Am scriptat  si asta:

[pawn]// -- surenos --

if(IsASurenos(newcar))

{

    if(PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == 5) { }

    else {

        RemovePlayerFromVehicle(playerid);

        SendClientMessage(playerid, COLOR_GREY,"You don't have keys of this vehicle.");}

}

// ----[/pawn]

Cu toate ca aveam si aici:

[pawn]

public IsASurenos( playerid, newcar )

{

if(newcar == surcar1 || newcar == surcar2 || newcar == surcar3 || newcar == surcar4 || newcar == surcar5 || newcar == surcar6 || newcar == surcar7)

{

if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5){}

{

        SendClientMessage(playerid,COLOR_GREY," Nu esti membru Surenos ");

        RemovePlayerFromVehicle(playerid);

    }

}

}[/pawn]

Dar cu toate astea nu merge nici una.

Link to comment
Share on other sites

e total gresit cam ce ai incercat tu sa faci acolo

in public verifici doar daca masina apartine acelei factiuni

[pawn]

public IsASurenos( newcar )

{

    if(newcar == surcar1 || newcar == surcar2 || newcar == surcar3 || newcar == surcar4 || newcar == surcar5 || newcar == surcar6 || newcar == surcar7)

    {

        return 1;

    }

return 0;

}

[/pawn]

iar partea unde se apeleaza acel public trebuie asa

[pawn]

if(IsASurenos(newcar))

{

if(PlayerInfo[playerid][pLeader] == 5||PlayerInfo[playerid][pMember] == 5) { }

else {

SendClientMessage(playerid,COLOR_GREY," Nu esti membru Surenos ");

RemovePlayerFromVehicle(playerid);

}

}

[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.