AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Switch statement returns errors (https://forums.alliedmods.net/showthread.php?t=147746)

Pantheon 01-13-2011 10:37

Switch statement returns errors
 
PHP Code:

public InvisRelease(id) {
    
set_task(0.1"SecondFunc"0)
    
    switch(
visTime) {
        case 
1:
            
set_task(10.0"Func"0)
        break;
        
        case 
2:
            
set_task(20.0"Func"0)
        break;
        
        case 
3:
            
set_task(30.0"Func"0)
        break;
        
        case 
4:
            
set_task(40.0"Func"0)
        break;
        
        case 
5:
            
set_task(50.0"Func"0)
        break;
        
        case 
6:
            
set_task(60.0"Func"0)
        break;
        
        case 
7:
            
set_task(70.0"Func"0)
        break;
        
        case 
8:
            
set_task(80.0"Func"0)
        break;
        
        case 
9:
            
set_task(90.0"Func"0)
        break;
        
        case 
10:
            
set_task(100.0"Func"0)
        break;
        
        case 
11:
            
set_task(110.0"Func"0)
        break;
    }


Any idea why it doesnt work properly?

Arkshine 01-13-2011 10:38

Re: Switch statement returns errors
 
Pawn is not C. Remove the "break".


All times are GMT -4. The time now is 01:58.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.