Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2013-07-01, 15:10


B!4CK

Never give UP!






Wiek: 32
Na forum: 5809 dni
Posty: 1047
Nick w MP: John

Piwa: 1891

Respekt: 124,2
Respekt: 124,2

Cze??, mam ot?? 16 warning?w, ale gdy wyszukuje to po prostu zaznaczonego kodu poprzez program nie ma.. Czyli tak jakby czyta?, a zarazem nie ma owej linijki..

Kod:

(12645) : warning 204: symbol is assigned a value that is never used: "carid"
(12646) : warning 204: symbol is assigned a value that is never used: "tires"
(12644) : warning 203: symbol is never used: "lights"
(12644) : warning 203: symbol is never used: "doors"
(12644) : warning 203: symbol is never used: "panels"
(12661) : warning 204: symbol is assigned a value that is never used: "carid"
(12662) : warning 204: symbol is assigned a value that is never used: "tires"
(12660) : warning 203: symbol is never used: "lights"
(12660) : warning 203: symbol is never used: "doors"
(12660) : warning 203: symbol is never used: "panels"
(26768) : warning 204: symbol is assigned a value that is never used: "vehicle"
(30240) : warning 204: symbol is assigned a value that is never used: "rands"
(43532) : warning 204: symbol is assigned a value that is never used: "result"
(44363) : warning 203: symbol is never used: "PlayerDrunk"
(44363) : warning 203: symbol is never used: "iOrder"
(16186) : warning 204: symbol is assigned a value that is never used: "iTGB"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


16 Warnings.



linijki :
12645 I 12646:
Kod:

new carid = GetPlayerVehicleID(playerid);


ca?y kod:
Pawn
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new 0sizeof(SpikeInfo); i++)
        {
            if(IsPlayerInRangeOfPoint(playerid3.0SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
            {
                if(SpikeInfo[i][sCreated] == 1)
                {
                    new panelsdoorslightstires;
                    new carid GetPlayerVehicleID(playerid);
                    tires encode_tires(1111);
                    return 0;
                }
            }
        }
    }
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        for(new 0sizeof(SpikeInfo); i++)
        {
            if(IsPlayerInRangeOfPoint(playerid3.0SpikeInfo[i][sX], SpikeInfo[i][sY], SpikeInfo[i][sZ]))
            {
                if(SpikeInfo[i][sCreated] == 1)
                {
                    new panelsdoorslightstires;
                    new carid GetPlayerVehicleID(playerid);
                    tires encode_tires(1111);
                    GameTextForPlayer(playerid,"~r~Kolczatka..",4000,3);
                    return 0;
                }
            }
        }
    }


linijka: 26768
Kod:


if(strcmp(cmd, "/seatbelt", true) == 0)
{
new vehicle = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
if(Seatbelt[playerid] == 0)
{
format(string, sizeof(string), "%s takes out his/her's seatbelt and buckles it in.", sendername);
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Seatbelt[playerid] = 1;
}
else
{
format(string, sizeof(string), "%s unbuckles his/her's seatbelt.", sendername);
ProxDetector(20.0, playerid, string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Seatbelt[playerid] = 0;
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_GRAD1,"You're not in a vehicle");
return 1;
}
}


linijka: 30240
Kod:

if(strcmp(cmd, "/bandage", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(GotBandage[playerid] == 0)
{
SendClientMessage(playerid, COLOR_WHITE, " You dont have any bandages, You can buy this at 24/7");
return 1;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You need to login first.");
return 1;
}
if(Dying[playerid] == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Can't use this when your dying.");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /bandage [Playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(1.0, playerid, giveplayerid))
{
if(Dying[giveplayerid] != 1)
{
if(giveplayerid == playerid)
{
SendClientMessage(playerid, COLOR_GREY, " You can not use bandage on yourself");
return 1;
}
if(IsPlayerInAnyVehicle(giveplayerid))
{
return 1;
}
new giveplayername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
new rands = random(2)+1;
format(string, sizeof(string), "* %s takes out bandage from his first-aid kit and raps it around %s", sendername, giveplayername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Dying[giveplayerid] = 0;
SetPlayerHealth(giveplayerid, 35);
SendClientMessage(giveplayerid, COLOR_WHITE, " You got healed, and should be able to walk again");
SendClientMessage(playerid, COLOR_WHITE, " You just used your bandage, You can buy more at 24/7");
GotBandage[playerid] = 0;
return 1;
}
}
}
}
}
}


Podpis
Cześć
! :)


Projekt, który poruszy scenę platformy SA:MP!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2013-07-01, 15:25


Combacior







Wiek: 29
Na forum: 5795 dni
Posty: 1516

Piwa: 2161

Respekt: 1060
Respekt: 1060

Ostrzeżeń: 20%
?w warningi oznaczaj?, ?e stworzy?e? te zmienne, ale nigdzie ich nie u?y?e? (is never used), b?d? s? przypisane, ale nie s? u?ywane w konkretnym celu (symbol is assigned a value) - na obydwa rodzaje warning?w pomo?e usuni?cie niepotrzebnych zmiennych.

Postaw piwo autorowi tego posta
 

 
Tagi: warning
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » [GF] WARNING Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku