Outerbeast / SC-Half-Life-2-Weapons

Half-Life 2 weapons for Sven Co-op
4 stars 0 forks source link

AR2 energy ball AS script error #2

Closed NoobLCH closed 1 month ago

NoobLCH commented 1 month ago

Issue happend: energy ball hit something:

Angelscript: Not allowed: in section 'd:/steamlibrary/steamapps/common/sven co-op/svencoop_addon/scripts/maps/hl2/weapon_hl2_ar2.as', at (490, 11):Angelscript: Function Angelscript: HL2_WEAPONS::ApplyTargetMagnetism: Angelscript: Message: Index out of bounds ERROR: Angelscript: CASBaseCallable::Call: Execution of function 'HL2_WEAPONS::ApplyTargetMagnetism' failed! ERROR: Angelscript: CScheduler::Think: execution of function HL2_WEAPONS::ApplyTargetMagnetism failed!

   array<CBaseEntity@> P_TARGETS( 8 );

   if( g_EntityFuncs.MonstersInSphere( @P_TARGETS, self.pev.origin, 128 ) < 1 )
        return;

    do( P_TARGETS.removeAt( P_TARGETS.findByRef( null ) ) );   <-- Crash here
    while( P_TARGETS.findByRef( null ) >= 0 );
Outerbeast commented 1 month ago

This is fixed on my end, but the revision will not be done up until the other issue is resolved.