ProyectV 
			Junior Member0  
	
		
			
Switch issues [Solved] 
 
				Well, this is my headache. For some reason that a i don't understand the switch only reads the case 1 and stays there. It dosen't do the other cases and it's been bothering me for about 5 to 6 hours. Help would be appreciated...
Spoiler below!  
 
 
			
				
(This post was last modified: 04-24-2014, 04:00 PM by ProyectV .) 
 
				
			 
		 
 
 
	04-20-2014, 11:01 PM  
		
	 
 
	
		Mudbill 
			Muderator179  
	
		
			
RE: Switch issues 
 
				Let's analyze what's happening here:IntroMapa . Where is this added from? I don't see what's executing it. I think we'll need the name of that timer to know how things work here.timer . String sIntro will now be named "timer".
			
			
				
(This post was last modified: 04-20-2014, 11:51 PM by Mudbill .) 
 
				
			 
		 
 
 
	04-20-2014, 11:50 PM  
		
	 
 
	
		ProyectV 
			Junior Member0  
	
		
			
RE: Switch issues 
 
				 (04-20-2014, 11:50 PM) Mudbill Wrote:  
I think that i know what to do... maybe with a "while" statement i can make the function work and then stop it, maybe...
			
 
			
			
			
		 
 
 
	04-22-2014, 12:10 AM  
		
	 
 
	
		Daemian 
			Posting Freak49  
	
		
			
RE: Switch issues 
 
				Mudbill means you need to add a timer somewhere to call the function multiple times, cause right now it's running only once.SetLocalVarInt( "IntroMapa", 0 ); 
			
			
 
 
 
	04-22-2014, 02:26 AM  
		
	 
 
	
		PutraenusAlivius 
			Posting Freak119  
	
		
			
RE: Switch issues 
 
				Amn is right, there is no way to pause a loop. You can only wait until what it wants is fulfilled.1  because the only matching case is Case 1 . If you declare sIntro to be 2 or 3, then the case being checked is the one that correspond with the declared condtion. If sIntro is 2  then the one checked is Case 2 . If it's 3  then the case checked is Case 3  and so on.
			
			
			
"Veni, vidi, vici.""I came, I saw, I conquered." 
			
		 
 
 
	04-22-2014, 08:25 AM  
		
	 
 
	
		Mudbill 
			Muderator179  
	
		
			
RE: Switch issues 
 
				I got a feeling that this is not your whole script, so where is the rest? This code is incomplete as it is, because we need to know where it's called from and how it's being called. I think that's all that remains. If you've already set up a timer loop that calls it, then we can figure out the problem there, but if not, this code won't do much until it's finished.
			
			
			
 
 
 
	04-22-2014, 09:33 AM  
		
	 
 
	
		ProyectV 
			Junior Member0  
	
		
			
RE: Switch issues 
 
				Well... this is my whole script so far...
Spoiler below!  
void OnStart()
 
 
			
				
(This post was last modified: 04-22-2014, 08:18 PM by ProyectV .) 
 
				
			 
		 
 
 
	04-22-2014, 07:20 PM  
		
	 
 
	
		Daemian 
			Posting Freak49  
	
		
			
RE: Switch issues 
 
				You should understand what's happening in your function before you keep adding code.
			
			
			
 
 
 
	04-23-2014, 04:44 AM  
		
	 
 
	
		ProyectV 
			Junior Member0  
	
		
			
RE: Switch issues 
 
				OMG i can't belive i was such an idiot!!! How could i forget the basis of a switch... anyway, thanks for everything, it's already solve, anyway here's the final product...
Spoiler below!  
switch(GetLocalVarInt(sIntro))
 
 
Of curse, it needs some changes but now the switch works!!!
Thaks for all... Especially mudbill for always being there for me.
			
				
(This post was last modified: 04-27-2014, 08:30 PM by ProyectV .) 
 
				
			 
		 
 
 
	04-23-2014, 11:08 PM