03.01.2012, 06:35
How to fix that?
Код:
forward BallDown(playerid, Float:oldz); public BallDown(playerid, Float:oldz) { new Float:x, Float:y, Float:z; GetObjectPos(Ball, x, y, z); new Float:a; new Float:x2, Float:y2; GetPlayerPos(playerid, x2, y2, a); GetPlayerFacingAngle(playerid, a); x2 += (16 * floatsin(-a, degrees)); y2 += (16 * floatcos(-a, degrees)); MoveObject(Ball, x2, y2, oldz-0.8, 10.0+random(3)); Baller = 999; ShootingBall = 0; BallBounce = 1; return 1; } GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance) { new Float:a; GetPlayerPos(playerid, x, y, a); GetPlayerFacingAngle(playerid, a); if (GetPlayerVehicleID(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid), a); } x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); }
Код:
C:\Documents and Settings\Admin\Desktop\FunZoneLT\gamemodes\FreeRoamLT.pwn(13350) : warning 219: local variable "a" shadows a variable at a preceding level C:\Documents and Settings\Admin\Desktop\FunZoneLT\gamemodes\FreeRoamLT.pwn(13436) : warning 219: local variable "a" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.