Raised This Month: $ Target: $400
 0% 

[SOLVED]problem with UTILFADE & parse


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 04-09-2011 , 16:30   [SOLVED]problem with UTILFADE & parse
Reply With Quote #1

so im tring to add a cvar for fade color & i got following error :

Code:
Error: Must be a constant expression; assumed zero on line 927
code :

PHP Code:
new turbo_fadecolor[16], turbo_fade_r[4], turbo_fade_g[4], turbo_fade_b[4]
    
get_pcvar_string(CV_Turbo_fade,turbo_fadecolor,sizeof turbo_fadecolor -1)
    
parse(turbo_fadecolorturbo_fade_r3,turbo_fade_g3,turbo_fade_b3)
    
CV_Turbo_fade_R str_to_num(turbo_fade_r)
    
CV_Turbo_fade_G str_to_num(turbo_fade_g)
    
CV_Turbo_fade_B str_to_num(turbo_fade_b)




public 
User_has_turbo_ON(id
{
    if(
is_user_alive(id) && !user_is_catcher[id]) 
    {
        if(
TURBO[id][1] < get_pcvar_num(CV_Turbo_Usage_Percent)) 
        {
            
TURBO[id][0] = 0
        
}
        else if(!
chilldown[id])
        {
            
TURBO[id][0] = 1
            TURBO
[id][1] -= get_pcvar_num(CV_Turbo_Usage_Percent)
            
set_task(get_pcvar_float(CV_Turbo_Usage_Time),"turbo_task",id)
            
Speed_settings(id)
            
chilldown[id] = 1
            UTIL_ScreenFade
(id,{CV_Turbo_fade_R,CV_Turbo_fade_G,CV_Turbo_fade_b},1.0,2.0,80)
        }
        
Player_Show_Stats(id)
    }

i tried to check if is my code wrong and i got the same error.


Code:
public User_has_turbo_ON(id) 
{
    if(is_user_alive(id) && !user_is_catcher[id]) 
    {
        if(TURBO[id][1] < get_pcvar_num(CV_Turbo_Usage_Percent)) 
        {
            TURBO[id][0] = 0
        }
        else if(!chilldown[id])
        {
            TURBO[id][0] = 1
            TURBO[id][1] -= get_pcvar_num(CV_Turbo_Usage_Percent)
            set_task(get_pcvar_float(CV_Turbo_Usage_Time),"turbo_task",id)
            Speed_settings(id)
            chilldown[id] = 1
            new r,g,b
            r = 255
            g = 255
            b = 255
            UTIL_ScreenFade(id,{r,g,b},1.0,2.0,80)
        }
        Player_Show_Stats(id)
    }
}
any ideas?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:05.


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