SA-MP Forums Archive
Combining.. - 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: Combining.. (/showthread.php?tid=456897)



Combining.. - cray1100 - 08.08.2013

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)




Re: Combining.. - Macluawn - 08.08.2013

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


Re: Combining.. - Bakr - 08.08.2013

Indent your code, it will show you the error.


Re: Combining.. - cray1100 - 08.08.2013

lol, thx, +repped both