Jump to content

Question

Posted

warning 219: local variable "X" shadows a variable at a preceding level
warning 219: local variable "Y" shadows a variable at a preceding level
warning 219: local variable "Z" shadows a variable at a preceding level
Linia
stock CreateVehicleEx(playerid, vehicletype, Float:X, Float:Y, Float:Z, Float:rotation, color1, color2, respawn_delay)
Iar tot Stock'ul este
stock CreateVehicleEx(playerid, vehicletype, Float:X, Float:Y, Float:Z, Float:rotation, color1, color2, respawn_delay)
{
	new world 	 = GetPlayerVirtualWorld(playerid);
	new interior = GetPlayerInterior(playerid);
	if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
		DestroyVehicle(GetPlayerVehicleID(playerid));
		GetPlayerPos(playerid, X, Y, Z);
		GetPlayerFacingAngle(playerid, rotation);
		CurrentSpawnedVehicle[playerid] = CreateVehicle(vehicletype, X, Y, Z, rotation, color1, color2, respawn_delay);
		SetVehicleNumberPlate(CurrentSpawnedVehicle[playerid], "{0066CC}R{FFFF00}G{FF0000}S");
        LinkVehicleToInterior(CurrentSpawnedVehicle[playerid], interior);
		SetVehicleVirtualWorld(CurrentSpawnedVehicle[playerid], world);
		SetVehicleZAngle(CurrentSpawnedVehicle[playerid], rotation);
		PutPlayerInVehicle(playerid, CurrentSpawnedVehicle[playerid], 0);
		SetPlayerInterior(playerid, interior);
	}
	if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
	{
	    if(IsVehicleOccupied(CurrentSpawnedVehicle[playerid]))
		{
		    return 1;
		}
		else
		{
			DestroyVehicle(CurrentSpawnedVehicle[playerid]);
		}
		GetPlayerPos(playerid, X, Y, Z);
		GetPlayerFacingAngle(playerid, rotation);
		CurrentSpawnedVehicle[playerid] = CreateVehicle(vehicletype, X, Y, Z, rotation, color1, color2, respawn_delay);
		SetVehicleNumberPlate(CurrentSpawnedVehicle[playerid], "{0066CC}R{FFFF00}G{FF0000}S");
		LinkVehicleToInterior(CurrentSpawnedVehicle[playerid], interior);
		SetVehicleVirtualWorld(CurrentSpawnedVehicle[playerid], world);
		SetVehicleZAngle(CurrentSpawnedVehicle[playerid], rotation);
		PutPlayerInVehicle(playerid, CurrentSpawnedVehicle[playerid], 0);
		SetPlayerInterior(playerid, interior);
	}
	return 1;
}

Din ce cauza imi da aceste 3 warnuri?

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.