22.06.2010, 19:14
Hi again. I got some trouble with this function, can't really get it to work.
My command:
Some stuff I found on wiki:
I get these errors:
Thanks!
My command:
pawn Код:
if(strcmp(cmd, "/growtomato", true) == 0)
{
if(IsPlayerInArea(playerid, 282.254486, 237.957290, 1098.032470, 1032.043579))
{
if(FarmerInfo[playerid][pSeed] == 1)
{
FarmerInfo[playerid][pSeed] = 0;
SendClientMessage(playerid, RED, "Tomato seed planted.");
}
}
return 1;
}
pawn Код:
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
return 0;
}
Код:
(22503) : warning 217: loose indentation (29158) : warning 219: local variable "X" shadows a variable at a preceding level (29158) : warning 219: local variable "Y" shadows a variable at a preceding level (29158) : warning 219: local variable "Z" shadows a variable at a preceding level (29159) : error 035: argument type mismatch (argument 2) (29160) : warning 213: tag mismatch (29160) : warning 213: tag mismatch (29160) : warning 213: tag mismatch (29160) : warning 213: tag mismatch (29158) : warning 203: symbol is never used: "Z" (29158) : warning 203: symbol is never used: "Y" (29158) : warning 203: symbol is never used: "X" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.