Tag mismatch, where?
#1

: warning 213: tag mismatch

PHP код:
public OnBombExplode(playeridnumFloat:xFloat:yFloat:z)
{
        
//is called everytime a bomb explodes
        
for(new 0MAX_PLAYERS++) {
            if(
GetPlayerDistanceToPoint(ixyz) < gBombTypes[btype[playerid][num]][2]) {
                
SetPVarInt(i"nearExp"playerid);
                
SetTimerEx("ResetNearExp"150000"i"i);
            }
        }
        return 
1;

in the line with "if(GetPlayerDistance etc" should be a mistag, what is it? :S
Reply
#2

You are using GetPlayerDistanceToPoint which is 2D. That means it isn't using the z-float
If you want to use the z-float, you need to get GetPlayerDistanceToPointEx
So I fixed it

pawn Код:
public OnBombExplode(playerid, num, Float:x, Float:y, &Float:z)
{
        //is called everytime a bomb explodes
        for(new i = 0; i < MAX_PLAYERS; i ++) {
            if(GetPlayerDistanceToPoint(i, x, y) < 2 * gBombTypes[btype[playerid][num]][2]) {
                SetPVarInt(i, "nearExp", playerid);
                SetTimerEx("ResetNearExp", 15000, 0, "i", i);
            }
        }
        return 1;
}
If you still get a tag mismatch, remove &Float:z in OnBombExplode

Or if you use GetPlayerDistanceToPointEx, you can simply edit the line to
pawn Код:
if(GetPlayerDistanceToPointEx(i, x, y) < 2 * gBombTypes[btype[playerid][num]][2]) {
Reply
#3

Show
pawn Код:
new gBombTypes
and
pawn Код:
new btype
Reply
#4

pawn Код:
public OnBombExplode(playerid, num, Float:x, Float:y, Float:z)
{
        //is called everytime a bomb explodes
        for(new i = 0; i < MAX_PLAYERS; i ++) {
            if(GetPlayerDistanceToPoint(i, x, y, z) < float(2 * gBombTypes[btype[playerid][num]][2])) {
                SetPVarInt(i, "nearExp", playerid);
                SetTimerEx("ResetNearExp", 15000, 0, "i", i);
            }
        }
        return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)