Combining..
#1

When i use this...
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == scorecase2)
    {
    if(IsPlayerAfk(playerid) == 1)return 0;
    {
    if(GetPlayerTeam(playerid) == 1)
    SetPlayerScore(playerid, GetPlayerScore(playerid) +10);
    }
    }
else if(pickupid == scorecase1)
    {
    if(IsPlayerAfk(playerid) == 1)return 0;
    {
    if(GetPlayerTeam(playerid) == 2)
    SetPlayerScore(playerid, GetPlayerScore(playerid) +10);
    }
    }
    return 1;
}
{
if(pickupid == yellow1)
    {
    if(IsPlayerAfk(playerid) == 1)return 0;
    {
    if(GetPlayerTeam(playerid) == 1)
    GivePlayerWeapon(playerid, 2, 1);
    }
    }
else if(pickupid == yellow2)
    {
    if(IsPlayerAfk(playerid) == 1)return 0;
    {
    if(GetPlayerTeam(playerid) == 2)
    GivePlayerWeapon(playerid, 2, 1);
    }
    }
return 1;
}
How do i properly combine the two sets..?

I get this and this...
Quote:

error 055: start of function body without function header
error 010: invalid function or declaration
error 010: invalid function or declaration
error 010: invalid function or declaration
error 010: invalid function or declaration
error 010: invalid function or declaration... (And more 010's)

Reply
#2

Check the braces. It looks like the last two if's are outside of any callback.
Reply
#3

Indent your code, it will show you the error.
Reply
#4

lol, thx, +repped both
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)