Jump to content

[REZOLVAT] Warning 208


CosminAK
 Share

Recommended Posts

Salut cum pot rezolva acest warning ?

(12940) : warning 208: function with tag result used before definition, forcing reparse
(28955) : warning 208: function with tag result used before definition, forcing reparse
function Float:DistanceToPlayer(playerid, targetid) // linia 28955
{
	new Float: Pos[3], Float: distance;
	GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
	distance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
	return distance;
}
function Float:GetDistanceBetweenPlayers(p1,p2) //linia 12940
{
	new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
	if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) return -1.00;
	GetPlayerPos(p1,x1,y1,z1);
	GetPlayerPos(p2,x2,y2,z2);
	return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
Link to comment
Share on other sites



forward Float:GetDistanceBetweenPlayers(p1,p2);
forward Float:DistanceToPlayer(playerid, targetid);
public Float:GetDistanceBetweenPlayers(p1,p2) //linia 12940
{
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) return -1.00;
GetPlayerPos(p1,x1,y1,z1);
GetPlayerPos(p2,x2,y2,z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
public Float:DistanceToPlayer(playerid, targetid) // linia 28955
{
new Float: Pos[3], Float: distance;
GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
distance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
return distance;
}

bcugZLK.png 

bwTYRvf.png

Link to comment
Share on other sites


forward Float:GetDistanceBetweenPlayers(p1,p2);
forward Float:DistanceToPlayer(playerid, targetid);
public Float:GetDistanceBetweenPlayers(p1,p2) //linia 12940
{
	new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
	if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) return -1.00;
	GetPlayerPos(p1,x1,y1,z1);
	GetPlayerPos(p2,x2,y2,z2);
	return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
public Float:DistanceToPlayer(playerid, targetid) // linia 28955
{
	new Float: Pos[3], Float: distance;
	GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
	distance = GetPlayerDistanceFromPoint(playerid, Pos[0], Pos[1], Pos[2]);
	return distance;
}

primesc aceleasi warning-uri

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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