ItsMods

Full Version: Potential Infinite Loop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright this dumb ass error has been bugging me for a week now and I have yet to find a fix. Hopefully one of you guys can find a fix to it.

http://pastebin.com/EiYqyybu

All my for/while's have a waittill or a wait in them so I have no fucking clue. I'll attach my other GSC's too even though they don't cause the problems (tested it by removing them).

Also it occurs after level thread ChooseFirstInfected() is called.
But when it occurs is after the player respawns (not the bots or whatever but YOU, it doesn't make them crash so I have 0 fucking clue).
(10-25-2013, 00:40)DidUknowiPwn Wrote: [ -> ]Alright this dumb ass error has been bugging me for a week now and I have yet to find a fix. Hopefully one of you guys can find a fix to it.

http://pastebin.com/EiYqyybu

All my for/while's have a waittill or a wait in them so I have no fucking clue. I'll attach my other GSC's too even though they don't cause the problems (tested it by removing them).

Also it occurs after level thread ChooseFirstInfected() is called.
But when it occurs is after the player respawns (not the bots or whatever but YOU, it doesn't make them crash so I have 0 fucking clue).

What is getting into infinite loop? The selection of infecteds?
I don't see the problem this all about in your post.

Also is it possible to add a "level notify xy" to the onPlayerKilled section to kill the ChooseFirstInfected() until the next rounds starts? I hope you know what I mean.
Okay so as soon as choosefirstinfected is called the moment you respawn you'll get an infinite loop error. I've tried placing iprintln everywhere but nothing is called more than once
Okay after a week and a half, I finally figured out the issue at 10PM tonight.
Issue was from OnPlayerKilled, specifically the part where the 'attacker' would receive specialist bonus once they ascertain the required kill count.
So what I did for it's replacement
Code:
SpecialistThink()
{
    self endon("death");
    self endon("disconnect");
    self endon("joined_team");
    
    for(;;)
    {
        self waittill("killed_enemy");
        if( self.pers["cur_kill_streak"] == 2 )
        {
            self.ksOneIcon.alpha = 1;
            self _SetPerk( level.infc_SpecialistPerk1 );
            self Specialist( getPerkString( level.infc_SpecialistPerk1 ), GetGoodColor(), getPerkMaterial( level.infc_SpecialistPerk1 ) );
        }
        else if( self.pers["cur_kill_streak"] == 4 )
        {
            self.ksTwoIcon.alpha = 1;
            self _SetPerk( level.infc_SpecialistPerk2 );
            self Specialist( getPerkString( level.infc_SpecialistPerk2 ), GetGoodColor(), getPerkMaterial( level.infc_SpecialistPerk2 ) );
        }        
        else if( self.pers["cur_kill_streak"] == 6 )
        {
            self.ksThrIcon.alpha = 1;
            self _SetPerk( level.infc_SpecialistPerk3 );
            self Specialist( getPerkString( level.infc_SpecialistPerk3 ), GetGoodColor(), getPerkMaterial( level.infc_SpecialistPerk3 ) );
        }
        else if( self.pers["cur_kill_streak"] == 8 )
        {
            self.ksForIcon.alpha = 1;
            self setAllPerks();    
            self Specialist( "Specialist Bonus", GetGoodColor(), level.infc_Specialist );
        }
        else if( self.pers["cur_kill_streak"] == 24 && getDvarInt( "moab" ) == 1 )
        {
            self maps\mp\killstreaks\_killstreaks::giveKillstreak( "nuke", true );
            self thread maps\mp\gametypes\_hud_message::killstreakSplashNotify( "nuke", 24 );
        }
    }
}
Dropped it in with: SpecialistList()

Thread can be locked/archived.
@Pozzuh happy again?
(10-27-2013, 06:57)DidUknowiPwn Wrote: [ -> ]@Pozzuh happy again?

Seriously?
This thread has been moved to the boards archive.
Contact a moderator in case you want to contribute to this thread.