Код
#define MAXTURRETS 1024
public Action:SleepShow(Handle:Timer, any:turret)
{
static Float:Andles[4][3], Float:Speed[4], turretg[MAXTURRETS];
decl Float:defAngles[3];
GetDefTurretAngles(turret, defAngles);
Andles[0] = Float:{10.0, -40.0, 0.0};
Andles[1] = Float:{-10.0, 30.0, 0.0};
Andles[2] = Float:{2.0, -10.0, 0.0};
Andles[3] = NULL_VECTOR;
Speed[0] = 10.0;
Speed[1] = 6.0;
Speed[2] = 6.0;
Speed[3] = 6.0;
for (new a; a<=2;a++)
Andles[turretg[turret]][a] += defAngles[a];
(378) GoNewAngles(turret, Andles[turretg[turret]], false, Speed[turretg]);
if(++turretg[turret] >= 3)
turretg[turret] = 0;
}
GoNewAngles(turret, Float:angles[3], bool:success=false, Float:speed=5.0)
{
static iTimer[MAXTURRETS];
SetTrieArray(h_TurretTrie[turret], "DesiredAngles", angles, 3);
SetTrieValue(h_TurretTrie[turret], "speed", speed);
if (!iTimer[turret])
iTimer[turret] = AI_CreateProgress(turret, AcquisitionAngles);
else if (success)
AI_KillProgress(turret, iTimer[turret]-1);
}
...\ht_turret.sp(378) : error 033: array must be indexed (variable "turretg")