03.08.2011, 03:07
Hola, yo tengo este Codigo, que se fija el Auto que tiene mas cerca el Jugador...
Pero al Compilar...
No se que puedo hacer..
Si alguien me Ayudase
pawn Код:
forward Float:DistanciaEntreJugadorAlVehiculo(playerid, vehicleid);
public DistanciaEntreJugadorAlVehiculo(playerid, vehicleid)
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if(!IsPlayerConnected(playerid))
{
return -1.00;
}
GetPlayerPos(playerid, x1, y1, z1);
GetVehiclePos(vehicleid, x2, y2, z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
forward VehiculoMasCerca(p1);
public VehiculoMasCerca(p1);
{
new x,Float:dis,Float:dis2,vehicle;
vehicle = -1;
dis = 99999.99;
for (x = 0; x < MAX_VEHICLES; x++)
{
if(x != p1)
{
dis2 = DistanciaEntreJugadorAlVehiculo(p1, x);
if(dis2 < dis && dis2 != -1.00)
{
dis = dis2;
vehicle = x;
}
}
}
return vehicle;
}
Код:
C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\pawno\include\progress.inc(63) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(3924) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(5282) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(5296) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11206) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11206) : warning 219: local variable "dis" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11214) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11232) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11232) : warning 219: local variable "dis" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11240) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11304) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11684) : error 025: function heading differs from prototype C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11685) : error 025: function heading differs from prototype C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11690) : warning 213: tag mismatch C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11694) : warning 213: tag mismatch C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11699) : error 055: start of function body without function header C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11701) : error 010: invalid function or declaration C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11703) : error 010: invalid function or declaration C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11705) : error 010: invalid function or declaration C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11708) : error 010: invalid function or declaration C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11715) : error 010: invalid function or declaration C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11721) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11721) : warning 219: local variable "dis" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(11721) : warning 219: local variable "dis2" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(12188) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(12391) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(12404) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(12665) : warning 219: local variable "x" shadows a variable at a preceding level C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(13243) : warning 203: symbol is never used: "dis" C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(13243) : warning 203: symbol is never used: "dis2" C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(13243) : warning 203: symbol is never used: "vehicle" C:\Documents and Settings\Administrador\Escritorio\CoD_Black_Ops\gamemodes\LSZombies.pwn(13243) : warning 203: symbol is never used: "x" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
Si alguien me Ayudase
