GTA Közösség - A magyar GTA fórum

Hatalmas Archívum => Fórum Archívum (Témák/Fórumok) => A témát indította: Rolplay - 2016. Február 01. - 16:07:14

Cím: Re:Itt kérdezz warningot/error -t!
Írta: Rolplay - 2016. Február 01. - 16:07:14
.
Cím: Re:Itt kérdezz warningot/error -t!
Írta: Brand - 2016. Augusztus 10. - 17:25:34
Sziasztok! Az lenne a problémám ,hogy 2 warningot kapok a következő sorokra:
 
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(IsVehicleAircraft(vehicleid))
    {
new weapons[ 13 ][ 2 ];
for( new i = 0; i < 13; i++ )
GetPlayerWeaponData( playerid, i, weapons[ i ][ 0 ], weapons[ i ][ 1 ] );
ResetPlayerWeapons( playerid );
for( new i = 0; i < 13; i++ )
GivePlayerWeapon( playerid, weapons[ i ][ 0 ], weapons[ i ][ 1 ] );
    }
    return 1;
}

 
warning 219: local variable \"vehicleid\" shadows a variable at a preceding level
warning 219: local variable \"vehicleid\" shadows a variable at a preceding level
Ezt a figyelmeztetést kapom a 2 számlálós ciklusra.
Cím: Re:Itt kérdezz warningot/error -t!
Írta: Xistance - 2016. Augusztus 10. - 17:36:51
Idézetet írta: Brand date=1470842734\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"59378\" data-ipsquote-contentclass=\"forums_Topic
Sziasztok! Az lenne a problémám ,hogy 2 warningot kapok a következő sorokra:
 
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(IsVehicleAircraft(vehicleid))
    {
new weapons[ 13 ][ 2 ];
for( new i = 0; i < 13; i++ )
GetPlayerWeaponData( playerid, i, weapons[ i ][ 0 ], weapons[ i ][ 1 ] );
ResetPlayerWeapons( playerid );
for( new i = 0; i < 13; i++ )
GivePlayerWeapon( playerid, weapons[ i ][ 0 ], weapons[ i ][ 1 ] );
    }
    return 1;
}

 
warning 219: local variable \"vehicleid\" shadows a variable at a preceding level
warning 219: local variable \"vehicleid\" shadows a variable at a preceding level
Ezt a figyelmeztetést kapom a 2 számlálós ciklusra.
 
Ez MTA segítségkérő, ez sa:mp gondolom
Cím: Re:Itt kérdezz warningot/error -t!
Írta: Brand - 2016. Augusztus 10. - 18:05:40
Elnézést, rossz helyre, bocsi  :(