Ayuda - Undefined symbol -
SetPlayerWantedLevel - 12.11.2015
Buenas, les comento mi problema, la cosa es que al compilar me sale esto:
(721) : error 017: undefined symbol "GetDistanceFromPointToPoint"
La cosa es que ese error viene en un include que estoy tratando de usar, la lнnea es la siguiente:
pawn Код:
Dist_to_origin = GetDistanceFromPointToPoint(Temp[0], Temp[1], Temp[2], Orig<Pos_x>, Orig<Pos_y>, Orig<Pos_z>);
Y la Callback la puse asн en el GameMode:
pawn Код:
CALLBACK: Float:GetDistanceFromPointToPoint(Float:X,Float:Y, Float:Z,Float:tX,Float:tY,Float:tZ)
{
return floatsqroot((tX-X)*(tX-X)+(tY-Y)*(tY-Y)+(tZ-Z)*(tZ-Z));
}
Muchas gracias por leer, darй +REP a quien me ayude

.
Respuesta: Ayuda - Undefined symbol -
GranaT3 - 12.11.2015
Elimina lo que esta en negro. (CALLBACK: )
Код:
CALLBACK: Float:GetDistanceFromPointToPoint(Float:X,Float:Y, Float:Z,Float:tX,Float:tY,Float:tZ)
{
return floatsqroot((tX-X)*(tX-X)+(tY-Y)*(tY-Y)+(tZ-Z)*(tZ-Z));
}
pawn Код:
// si lo usas asi:
Float: GetDistanceFromPointToPoint(Float:X,Float:Y, Float:Z,Float:tX,Float:tY,Float:tZ)
{
return floatsqroot((tX-X)*(tX-X)+(tY-Y)*(tY-Y)+(tZ-Z)*(tZ-Z));
}
sera una funciуn
// Para definir un callback seria asi:
forward Float:GetDistanceFromPointToPoint(Float:X,Float:Y, Float:Z,Float:tX,Float:tY,Float:tZ);
public Float:GetDistanceFromPointToPoint(Float:X,Float:Y, Float:Z,Float:tX,Float:tY,Float:tZ)
{
return floatsqroot((tX-X)*(tX-X)+(tY-Y)*(tY-Y)+(tZ-Z)*(tZ-Z));
}
Re: Ayuda - Undefined symbol -
SetPlayerWantedLevel - 12.11.2015
Grana, lo puse asн y se me fue el error pero vino otro.
error 017: undefined symbol "IsValidVehicle"
Asi lo tengo en el GM
pawn Код:
native IsValidVehicle(vehicleid);
Lнnea de error
pawn Код:
if(!IsValidVehicle(vehicleid)) return 0;
Respuesta: Ayuda - Undefined symbol -
GranaT3 - 12.11.2015
Que raro. їEstas declarando el native fuera de alguna funcion/callback?. Tambiйn puedes verificar que estйs usando el "pawno.exe" de la carpeta de tu GM. No deberнa darte error
Re: Respuesta: Ayuda - Undefined symbol -
SetPlayerWantedLevel - 12.11.2015
Quote:
Originally Posted by GranaT3
Que raro. їEstas declarando el native fuera de alguna funcion/callback?. Tambiйn puedes verificar que estйs usando el "pawno.exe" de la carpeta de tu GM. No deberнa darte error
|
Lo tengo abajo de los includes, da error
Respuesta: Re: Respuesta: Ayuda - Undefined symbol -
GranaT3 - 12.11.2015
Quote:
Originally Posted by SetPlayerWantedLevel
Lo tengo abajo de los includes, da error 
|
La linea del error es la de la native o el del if?, si es la del if el error podria estar en la linea anterior a esa.
Re: Ayuda - Undefined symbol -
SetPlayerWantedLevel - 12.11.2015
pawn Код:
ANTIC::SetVehicleToRespawn(vehicleid)
{
if(!IsValidVehicle(vehicleid)) return 0;
SetVehicleToRespawn(vehicleid);
VarVehicle(vehicleid)<Pos_x> = VarVehicle(vehicleid)<Native_x>;
VarVehicle(vehicleid)<Pos_y> = VarVehicle(vehicleid)<Native_y>;
VarVehicle(vehicleid)<Pos_z> = VarVehicle(vehicleid)<Native_z>;
VarVehicle(vehicleid)<Native_Angle> = VarVehicle(vehicleid)<Native_Angle>;
return 1;
}
Esa es la funciуn completa, la lнnea de error:
if(!IsValidVehicle(vehicleid)) return 0;
Respuesta: Re: Ayuda - Undefined symbol -
GranaT3 - 12.11.2015
Quote:
Originally Posted by SetPlayerWantedLevel
pawn Код:
ANTIC::SetVehicleToRespawn(vehicleid) { if(!IsValidVehicle(vehicleid)) return 0;
SetVehicleToRespawn(vehicleid);
VarVehicle(vehicleid)<Pos_x> = VarVehicle(vehicleid)<Native_x>; VarVehicle(vehicleid)<Pos_y> = VarVehicle(vehicleid)<Native_y>; VarVehicle(vehicleid)<Pos_z> = VarVehicle(vehicleid)<Native_z>; VarVehicle(vehicleid)<Native_Angle> = VarVehicle(vehicleid)<Native_Angle>;
return 1; }
Esa es la funciуn completa, la lнnea de error:
if(!IsValidVehicle(vehicleid)) return 0;
|
prueba quitando un ":" de..
"ANTIC:
:SetVehicleToRespawn(vehicleid)"
Re: Respuesta: Re: Ayuda - Undefined symbol -
SetPlayerWantedLevel - 12.11.2015
Quote:
Originally Posted by GranaT3
prueba quitando un ":" de..
"ANTIC::SetVehicleToRespawn(vehicleid)"
|
Da 13 errores
Re: Ayuda - Undefined symbol -
Kevln - 12.11.2015
pawn Код:
stock Hook_SetVehicleToRespawn(vehicleid)
{
if(!IsValidVehicle(vehicleid)) return 0;
// ...
return SetVehicleToRespawn(vehicleid);
}
#if defined _ALS_SetVehicleToRespawn
#undef SetVehicleToRespawn
#else
#define _ALS_SetVehicleToRespawn
#endif
#define SetVehicleToRespawn Hook_SetVehicleToRespawn