My pickup Warnings...
#1

Ok, i get this warning,

Quote:

warning 215: expression has no effect

24 times... In this script,

pawn Код:
#define FILTERSCRIPT

#include <a_samp>

new jedicollect1;
new jedicollect2;
new jedicollect3;
new sithcollect1;
new sithcollect2;
new sithcollect3;
new PickedUpJedi[MAX_PLAYERS];
new PickedUpSith[MAX_PLAYERS];

public OnFilterScriptInit()
{
    jedicollect1 = AddStaticPickup(1274, 15, -140.1850, 597.2230, 9.0258, -1);
    jedicollect2 = AddStaticPickup(1274, 15, 817.6894, 843.1435, 12.9462, -1);
    jedicollect3 = AddStaticPickup(1274, 15, 1748.3247, 630.2747, 10.3003, -1);
    sithcollect1 = AddStaticPickup(1274, 15, 1685.0314, 407.2442, 19.7121, -1);
    sithcollect2 = AddStaticPickup(1274, 15, 740.9005, 300.8302, 19.7186, -1);
    sithcollect3 = AddStaticPickup(1274, 15, -587.2263, -151.6541, 77.6556, -1);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    (PickedUpJedi[playerid] == 0);
    (PickedUpSith[playerid] == 0);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    (PickedUpJedi[playerid] == 0);
    (PickedUpSith[playerid] == 0);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    (PickedUpJedi[playerid] == 0);
    (PickedUpSith[playerid] == 0);
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == jedicollect1)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            if(PickedUpJedi[playerid] == 0)
            {
                (PickedUpJedi[playerid] == 1);
            }
            else if(PickedUpJedi[playerid] == 1)
            {
                (PickedUpJedi[playerid] == 2);
            }
            else if(PickedUpJedi[playerid] == 2)
            {
                (PickedUpJedi[playerid] == 3);
            }
        }
    }
    else if(pickupid == jedicollect2)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            if(PickedUpJedi[playerid] == 0)
            {
                (PickedUpJedi[playerid] == 1);
            }
            else if(PickedUpJedi[playerid] == 1)
            {
                (PickedUpJedi[playerid] == 2);
            }
            else if(PickedUpJedi[playerid] == 2)
            {
                (PickedUpJedi[playerid] == 3);
            }
        }
    }
    else if(pickupid == jedicollect3)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            if(PickedUpJedi[playerid] == 0)
            {
                (PickedUpJedi[playerid] == 1);
            }
            else if(PickedUpJedi[playerid] == 1)
            {
                (PickedUpJedi[playerid] == 2);
            }
            else if(PickedUpJedi[playerid] == 2)
            {
                (PickedUpJedi[playerid] == 3);
            }
        }
    }
    else if(pickupid == sithcollect1)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            if(PickedUpSith[playerid] == 0)
            {
                (PickedUpSith[playerid] == 1);
            }
            else if(PickedUpSith[playerid] == 1)
            {
                (PickedUpSith[playerid] == 2);
            }
            else if(PickedUpSith[playerid] == 2)
            {
                (PickedUpSith[playerid] == 3);
            }
        }
    }
    else if(pickupid == sithcollect2)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            if(PickedUpSith[playerid] == 0)
            {
                (PickedUpSith[playerid] == 1);
            }
            else if(PickedUpSith[playerid] == 1)
            {
                (PickedUpSith[playerid] == 2);
            }
            else if(PickedUpSith[playerid] == 2)
            {
                (PickedUpSith[playerid] == 3);
            }
        }
    }
    else if(pickupid == sithcollect3)
    {
        if(GetPlayerTeam(playerid) == 1)
        {
            if(PickedUpSith[playerid] == 0)
            {
                (PickedUpSith[playerid] == 1);
            }
            else if(PickedUpSith[playerid] == 1)
            {
                (PickedUpSith[playerid] == 2);
            }
            else if(PickedUpSith[playerid] == 2)
            {
                (PickedUpSith[playerid] == 3);
            }
        }
    }
    return 1;
}
And i dont understand why, can someone help me?
Reply
#2

pawn Код:
(PickedUpSith[playerid] == 1);
Needs to be
pawn Код:
PickedUpSith[playerid] == 1;
So remove the ()
Reply
#3

Do i need to do that to EVERY SINGLE ONE?
Reply
#4

Yes.
Reply
#5

Even, the...

if(PickedUpSith[playerid] == 0) 's?
Reply
#6

If it's an "if" statement, no.
Reply
#7

I tried it, and still got the warnings
Reply
#8

You should use CreatePickup() to make pickups for that purpose. Here's the wiki link , click here.
Reply
#9

I tried that... Thats what i had at first, thats why i tried to use addstaticpickup... Neither work...
Reply
#10

Someone please help... ),:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)