Check if falling problem
#1

Код:
public CheckFalling(playerid)
{
	new float:d, Float:Pos[3];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		GetPlayerPos(i, Pos[0], Pos[1], Pos[2]);
		d = floatsqroot(Pos[0]-PosX[i]*Pos[0]-PosX[i]+Pos[1]-PosY[i]*Pos[1]-PosY[i]);
	    if(d < 10 && PosZ[i]-Pos[2] > 5)	
	    {
	    	isfalling[i] = 1;
	    }
	    else
	    {
	    	isfalling[i] = 0;
	    }
	}
}
i receive tag mismatch at lines
Код:
		d = floatsqroot(Pos[0]-PosX[i]*Pos[0]-PosX[i]+Pos[1]-PosY[i]*Pos[1]-PosY[i]);
	    if(d < 10 && PosZ[i]-Pos[2] > 5)
Reply
#2

PHP код:
floatsqroot((Pos[0]-PosX[i]*Pos[0]-PosX[i])+(Pos[1]-PosY[i]*Pos[1]-PosY[i]));
if(
10 && (PosZ[i]-Pos[2]) > 5
Reply
#3

still tag mismatch
Reply
#4

how did you define PosX,PosY and PosZ?
Reply
#5

PHP код:
new Float:dFloat:Pos[3]; 
Your tag mismatched

You are using the float directive rather than the Float directive,

What's the difference. I don't know the pawn compiler makes a tag mismatch if you didn't use the same letter cases. Most of the time. You can also ignore that warning. That's just a warning which does not really have an effect, unless if the tag mismatch was about a input of different variables such as ints with floats.. You know what I mean
Reply
#6

Quote:
Originally Posted by JesterlJoker
Посмотреть сообщение
PHP код:
new Float:dFloat:Pos[3]; 
Your tag mismatched

You are using the float directive rather than the Float directive,

What's the difference. I don't know the pawn compiler makes a tag mismatch if you didn't use the same letter cases. Most of the time. You can also ignore that warning. That's just a warning which does not really have an effect, unless if the tag mismatch was about a input of different variables such as ints with floats.. You know what I mean
Thanks!!! i didn't realise that i didn't put
Код:
Float
Reply
#7

How can i return a zcmd command?
Reply
#8

Quote:
Originally Posted by C0oL3r
Посмотреть сообщение
How can i return a zcmd command?
Код:
CMD:test(playerid, params[]) returns cmd_test1(playerid, params); 

CMD:test1(playerid, params[])
{
     //something here.
}
If thats what you asked?
Reply
#9

Yeah, thanks!
Reply
#10

Код:
#define IsFallingAnimation(%1) (%1 >= 958 && %1 <= 979 || %1 == 1130 || %1 == 1195 || %1 == 1132)

stock IsPlayerFalling(playerid)
{
    new index = GetPlayerAnimationIndex(playerid);
	return IsFallingAnimation(index);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)