(180) : warning 213: tag mismatch
#1

my error

Код:
(180) : warning 213: tag mismatch
(180) : warning 213: tag mismatch
(180) : warning 213: tag mismatch
(181) : error 029: invalid expression, assumed zero
(181) : error 029: invalid expression, assumed zero
(181) : warning 215: expression has no effect
(181) : error 001: expected token: ";", but found "]"
(181) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
new FireX,FireY,FireZ;

new FiresX[MAX_PLAYERS],FiresY[MAX_PLAYERS],FiresZ[MAX_PLAYERS];

stock CreateFire(Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
{
 CreateDynamicObject(18688, FireX, FireY, FireZ-2,Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
 return 1;
}

stock SetPlayerOnFire(playerid)
{
 GetPlayerPos(playerid,FiresX[playerid],FiresY[playerid],FiresZ[playerid]);//line 180
 CreateDynamicObject(18688, FiresX[playerid],FiresY[playerid],FiresZ-2[playerid],000.00,000.000,000.000,60);//line 181
 return 1;
}

stock IsPlayerInFire(playerid)
{
 if(IsPlayerInRangeOfPoint(playerid, 3.0, FiresX[playerid],FiresY[playerid],FiresZ-2[playerid])
  {
   new Float:Health;
   Health = GetPlayerHealth(playerid);
   SetPlayerHealth(playerid,Health-20);
  }
  return 1;
}

CMD:setmefire(playerid,params[])
{
 SetPlayerOnFire(playerid);
}
help ..
Reply
#2

GetPlayerPos returns float values. You're trying to store the data into integer variables. Add a Float: tag!

for example:

pawn Код:
new Float:FiresX[MAX_PLAYERS];
Reply
#3

like this ?
pawn Код:
new FireX,FireY,FireZ;

new Float:FiresX[MAX_PLAYERS],Float:FiresY[MAX_PLAYERS],Float:FiresZ[MAX_PLAYERS];

stock CreateFire(Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
{
 CreateDynamicObject(18688, FireX, FireY, FireZ-2,Float:rX, Float:rY, Float:rZ, Float:DrawDistance);
 return 1;
}

stock SetPlayerOnFire(playerid)
{
 GetPlayerPos(playerid,FiresX[playerid],FiresY[playerid],FiresZ[playerid]);//line 180
 CreateDynamicObject(18688, FiresX[playerid],FiresY[playerid],FiresZ[playerid]-2,000.00,000.000,000.000,60);//line 181
 return 1;
}

stock IsPlayerInFire(playerid)
{
 if(IsPlayerInRangeOfPoint(playerid, 3.0, FiresX[playerid],FiresY[playerid],FiresZ-2[playerid])
  {
   new Float:Health;
   Health = GetPlayerHealth(playerid);
   SetPlayerHealth(playerid,Health-20);
  }
  return 1;
}

CMD:setmefire(playerid,params[])
{
 SetPlayerOnFire(playerid);
}
EDIT: wow its work rep+
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)