SA-MP Forums Archive
Help Me ! - 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: Help Me ! (/showthread.php?tid=495639)



Help Me ! - ChandraLouis - 18.02.2014

Errors :
pawno\include\YSI\y_va/impl.inc(56 : warning 219: local variable "time" shadows a variable at a preceding level
pawno\include\YSI\y_va/impl.inc(573) : warning 219: local variable "time" shadows a variable at a preceding level
pawno\include\YSI\y_hooks/impl.inc(2624) : warning 219: local variable "time" shadows a variable at a preceding level


Re: Help Me ! - $Marco$ - 18.02.2014

You need to show the code for us to help you.


Re: Help Me ! - Clad - 18.02.2014

Show the Line please


Re: Help Me ! - Cvnnor - 18.02.2014

It means you're using the variable time twice, just remove one and it will solve the errors


Re: Help Me ! - ChandraLouis - 18.02.2014

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(team[playerid] == TEAM_HUMAN)
    {
        new string[256];
        if(Map[EvacType] == 1)
        {
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid,-1408.2051,-970.8841,198.9738);
            format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to evacuation point and has received 1 coin!",PlayerName(playerid));
            SendClientMessageToAll(-1,string);
            DisablePlayerCheckpoint(playerid);
            CurePlayer(playerid);
            GivePlayerXP(playerid,50);
            pInfo[playerid][pEvac]++;
            pInfo[playerid][pCoins]++;
            SetPlayerColor(playerid,COLOR_YELLOW);
        }

        if(Map[EvacType] == 2)
        {
            SetPlayerPos(playerid,3024.4983,447.9744,14.7813);
            SetPlayerInterior(playerid,0);
            format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the water evacuation point and has received 1 coin!",PlayerName(playerid));
            SendClientMessageToAll(-1,string);
            DisablePlayerCheckpoint(playerid);
            CurePlayer(playerid);
            GivePlayerXP(playerid,50);
            pInfo[playerid][pEvac]++;
            pInfo[playerid][pCoins]++;
            SetPlayerColor(playerid,COLOR_YELLOW);
        }

        if(Map[EvacType] == 3)
        {
            SetPlayerPos(playerid,285.5,2510.30004882817,121.5);
            SetPlayerInterior(playerid,0);
            format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the helicopter evacuation point and has received 1 coin!",PlayerName(playerid));
            SendClientMessageToAll(-1,string);
            DisablePlayerCheckpoint(playerid);
            CurePlayer(playerid);
            GivePlayerXP(playerid,50);
            pInfo[playerid][pEvac]++;
            pInfo[playerid][pCoins]++;
            SetPlayerColor(playerid,COLOR_YELLOW);
        }

        if(Map[EvacType] == 4)
        {
            SetPlayerPos(playerid,1456.3000488281,-1126,427.10000610352);///By Fahad
            SetPlayerInterior(playerid,0);
            format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the Parachute evacuation point and has received 1 coin!",PlayerName(playerid));
            SendClientMessageToAll(-1,string);
            DisablePlayerCheckpoint(playerid);
            CurePlayer(playerid);
            GivePlayerXP(playerid,50);
            pInfo[playerid][pEvac]++;
            pInfo[playerid][pCoins]++;
            GivePlayerWeapon(playerid,46,1);
            SetPlayerColor(playerid,COLOR_YELLOW);

        }
    }
    return 1;
}
and
pawn Код:
if(team[playerid] == TEAM_ZOMBIE)
        {
            if(pInfo[playerid][pZombieClass] == ADVANCEDMUTATED)
            {
                if(gettime() - 10 < Abilitys[playerid][AdvancedMutatedCooldown]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
                {
                    foreach(Player,i)
                    {
                        switch(GetPlayerSkin(i))
                        {
                            case NON_IMMUNE:
                            {
                                if(GetDistanceBetweenPlayers(playerid,i) < 6.5)
                                {
                                    if(pInfo[i][IsPlayerInfected] == 0)
                                    {
                                        if(pInfo[i][pAdminDuty] == 0)
                                        {
                                            InfectPlayerStandard(i);
                                            GivePlayerXP(playerid,20);
                                            Abilitys[playerid][AdvancedMutatedCooldown] = gettime();
                                        }
                                        else if(pInfo[i][pAdminDuty] == 1)
                                        {
                                            SendClientMessage(playerid,COLOR_RED,"That player can't be infected because is on admin duty!");
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }



Re: Help Me ! - $Marco$ - 18.02.2014

Can you mark the lines 568, 573, 2624?


Re: Help Me ! - Beckett - 18.02.2014

You don't need to show code don't listen to those posts above, just change the variable name from TIME to anything else since TIME is already defined globally .


Re: Help Me ! - Vanter - 18.02.2014

Remove time in the both lines mentioned.


Re: Help Me ! - ChandraLouis - 18.02.2014

Thank You