Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how stop the Loop?
#1
How i can stop the loop?

if i have 2000 credits the loop will make -4x500 Money
if i have 0 Credits.
i tryed with "break;" but dont work.


Quote:onMenuResponse()
{
self endon( "death" );
self endon( "disconnect" );

while( true )
{
self waittill( "menuresponse", menu, response );

if( response == "l96" )



{
if(self.money >= 500)

{
self.money-=500;
self.hud_score_value setValue(self.money);
self giveWeapon( "l96a1_mp" );
self switchToWeapon( "l96a1_mp" );
self thread ScoreHUD( -500);
self iPrintln("L96 purchased");
}

}
Reply

#2
maybe
Code:
continue;
Confused
Reply

#3
stop the loop, if i use break; they dont stop an make 6 times the while( true)

Reply

#4
my god, did you try continue; ?

Reply

#5
continue; instead of what?
Reply

#6
(03-08-2012, 04:46)p2tk Wrote: continue; instead of what?

break; Tongue
Reply

#7
Quote:onMenuResponse()
{
self endon( "death" );
self endon( "disconnect" );

while( true )
{
self waittill( "menuresponse", menu, response );

if (response == "l96" && self.money >= 1000 )

{
self.money-=500;
self.hud_score_value setValue(self.money);
self giveWeapon( "l96a1_mp" );
self switchToWeapon( "l96a1_mp" );
self thread ScoreHUD( -500);
self iPrintln("L96 purchased");
continue; <---dont work
}
continue; <--- dont work
}
continue; <--- dont work
}


so what now? mostly it takes 6x the item (l96)
Reply

#8
dont know, it sure sound's like your making wins though

oh derp maybe throw a wait in there that might help
Reply

#9
tryed wait 5.0
only affect was, i need to wait 5 secs to use this function again, and make again 6 times this function


what i can use for "while (true)"
to ask this function
Reply

#10
(03-08-2012, 05:15)p2tk Wrote: tryed wait 5.0
only affect was, i need to wait 5 secs to use this function again, and make again 6 times this function


what i can use for "while (true)"
to ask this function

pack it up and pm me it and ill post fix here caint be to much wrong with it, its just hard to tell with out looking at it all, i work better when i see it happen myself i can sometime's pick an error down to the line when i run it myself after reading it lol
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Potential Infinite Loop DidUknowiPwn 5 3,768 10-27-2013, 22:22
Last Post: surtek
  STOP IT Nekochan 2 1,892 02-23-2013, 12:38
Last Post: surtek
  server stop working s.j-rez 9 4,793 08-26-2012, 06:23
Last Post: s.j-rez
  stop working eror{please help me:((} s.j-rez 0 1,795 08-25-2012, 12:47
Last Post: s.j-rez
  Help Stop music, change icons anedaktos13 2 2,307 06-12-2012, 15:50
Last Post: SuperNovaAO
  Stop your Black Ops Pre-order now! Samme 6 3,416 05-31-2012, 19:25
Last Post: Arteq
  Surprise - Stop itsmods negativity estebespt 11 5,944 05-04-2012, 20:06
Last Post: Arteq
Question help needed for: loop atenziono 2 2,287 03-02-2012, 17:42
Last Post: zxz0O0
  Help help to stop while vb.net reavenz 3 3,473 12-14-2011, 17:10
Last Post: barata
  STOP CALLING PEOPLE 4FunPlayin 1 2,037 10-01-2011, 15:15
Last Post: AZUMIKKEL

Forum Jump:


Users browsing this thread:
1 Guest(s)

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