Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Fixed]code lets Black Ops crash
#1
Hi,

I have a killstreak code with and i added a progress bar to it,
The problem is that black ops crashes after a few minutes of playing because of this code.

Anybody knows how to fix it?

Code:
CountKillstreak()
{
self endon("disconnect");
self endon("death");
    
    self.startscore = self.pers["kills"];
    self.killcount = 0;

    useBar = createPrimaryProgressBar( -250 );
        useBarText = createPrimaryProgressBarText( -250 );
        useBarText settext("Progress");
    useBarText.y = 205;
    useBar.bar.y = 220;
    useBar.y = 220;
    
    for(;;)
    {
        self thread deleteProbar(useBar, useBarText);

        if(self.killcount != self.pers["kills"] - self.startscore)
        {    
            self.killcount = self.pers["kills"] - self.startscore;
            switch(self.killcount)
            {
            case 2:
            {    self iPrintlnBold("Weapon Upgraded!");
                usebar updateBar(.1);
                self takeAllWeapons();
                self GiveWeapon("m16_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
                break;}
            case 3:
                {self iPrintlnBold("Weapon Upgraded!");
                usebar updateBar(.2);
                self takeAllWeapons();
                self GiveWeapon("enfield_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
                break;}
            case 4:
                {self iPrintlnBold("Weapon Upgraded!");
                usebar updateBar(.3);
                self takeAllWeapons();
                self GiveWeapon("famas_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
                break;}
            case 5:
                {self iPrintlnBold("Weapon Upgraded!");
                usebar updateBar(.4);
                self takeAllWeapons();
                self GiveWeapon("commando_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
                break;}
            case 6:
                {self iPrintlnBold("Weapon Upgraded!");
                usebar updateBar(.5);
                self takeAllWeapons();
                self GiveWeapon("m60_mp", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
                break;}
            case 7:
                {self iPrintlnBold("Weapon Upgraded!");
                usebar updateBar(.6);
                self GiveWeapon("tesla_gun_zm", 0, self calcWeaponoptions( 8, 0, 0, 1, 1 ));
                break;}
            }
    
        }
    wait .05;
    }
}

deleteProBar(elem1, elem2)
{
    self waittill_any("disconnect", "death");
    if(isDefined(elem1)) elem1 destroyelem();
    if(isDefined(elem2)) elem2 destroy();

    wait .05;
}
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
[Image: userbars.jpg]
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz
Reply

#2
You open this self thread deleteProbar really often. myabe u could show us the code?
[Image: ctoc.jpg]
Reply

#3
(09-08-2011, 12:26)Tomsen1410 Wrote: You open this self thread deleteProbar really often. myabe u could show us the code?

post updated
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
[Image: userbars.jpg]
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz
Reply

#4
I agree with tomsen, that might be it, altough it depends on what it does
yeah um you should really call it before for( ;; ) i think, your calling a shitload of those threads right now
Reply

#5
Yes, i think the problem depends on the thread. cause u open the damn thread every .05 secs and it waits till someone diconnects. u have to do another one.
and btw: credits would be nice for the streak function ; )
[Image: ctoc.jpg]
Reply

#6
(09-08-2011, 12:35)Tomsen1410 Wrote: Yes, i think the problem depends on the thread. cause u open the damn thread every .05 secs and it waits till someone diconnects. u have to do another one.
and btw: credits would be nice for the streak function ; )

ok i'll try, and i didn't "release" the code yet, so thats why i wait with the credits Wink
Quote: (report) SuperNovaAO - 03-03 23:34 -- Your mom's cunt also belongs to her private parts, yet everyone knows it.
(report) OrangePL - 03-03 23:34 -- And if you can't understand, this is called PRIVATE message
[Image: userbars.jpg]
My MW2 mod Group: http://steamcommunity.com/groups/davesmodzz
Reply

#7
<snip>
Reply

#8
(09-08-2011, 12:37)jariz Wrote:
(09-08-2011, 12:35)Tomsen1410 Wrote: Yes, i think the problem depends on the thread. cause u open the damn thread every .05 secs and it waits till someone diconnects. u have to do another one.
and btw: credits would be nice for the streak function ; )

aaaalright! Fuck yea!

i helped him alot. i just wanted to have a little credits not more : )
[Image: ctoc.jpg]
Reply

#9
i already snipped, didnt knew that
plz remove the quote lololol
Reply

#10
(09-08-2011, 12:41)jariz Wrote: i already snipped, didnt knew that
plz remove the quote lololol

Fuck yea!
[Image: ctoc.jpg]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Help cmdlist, dvarlist server crash Nerus 17 12,010 11-09-2013, 23:54
Last Post: Nerus
  Black Ops 2 Custom background? jotape99 10 12,510 10-29-2013, 07:22
Last Post: xInfinity.
  Black ops Help Bluexephos 4 5,330 10-06-2013, 16:24
Last Post: Nekochan
  Help Code color crosshairs koren30 3 4,035 10-02-2013, 19:26
Last Post: koren30
  Help need help?how to make plugins code hXnarutoXone 12 8,626 09-01-2013, 18:30
Last Post: Bandarigoda123
  Help Need Help with C# code tubwux 2 3,330 08-27-2013, 18:18
Last Post: tubwux
  [Request] Compile this code please dozsa0 4 4,166 08-10-2013, 21:02
Last Post: Nukem
  Compile this code please First_Semyon 12 9,753 08-08-2013, 14:53
Last Post: Bandarigoda123
  Compile please this code First_Semyon 8 5,680 07-28-2013, 01:52
Last Post: First_Semyon
  [Release] Black Ops 1 "External" Console barata 16 19,255 07-19-2013, 21:15
Last Post: Jakeyellis

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.