Raised This Month: $ Target: $400
 0% 

[SOLVED] Invalid Cvar Pointer


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 01-13-2014 , 09:37   [SOLVED] Invalid Cvar Pointer
Reply With Quote #1

Code:
L 01/13/2014 - 16:35:09: Invalid CVAR pointer
L 01/13/2014 - 16:35:09: [AMXX] Displaying debug trace (plugin "knife_mod.amxx")
L 01/13/2014 - 16:35:09: [AMXX] Run time error 10: native error (native "get_pcvar_float")
L 01/13/2014 - 16:35:09: [AMXX]    [0] knife_mod.sma::eCurWeapon (line 220)
PHP Code:
public plugin_init() { 
    
CVAR_LOWGRAV register_cvar("km_lowgravity" "400")
    
CVAR_NORMGRAV get_cvar_pointer("sv_gravity 500")
}
public 
eCurWeapon(id) {
    new 
Weapon read_data(2)
    
    
SetKnife(idknife_model[id])   
    
    if(
knife_model[id] == && !task_exists(id) && Weapon == CSW_KNIFE)
        
set_task(TASK_INTERVAL "task_healing",id,_,_,"b")
    else if(
task_exists(id))
        
remove_task(id)
    
    
set_user_footsteps(id , ( (knife_model[id] == && Weapon == CSW_KNIFE) ? 0) )
    
    new 
Float:Gravity = ((knife_model[id] == && Weapon == CSW_KNIFE)? get_pcvar_float(CVAR_LOWGRAV) : get_pcvar_float(CVAR_NORMGRAV)) / 800.0
    set_user_gravity
(id Gravity)
    
    new 
Float:Speed
    
if(Weapon != CSW_KNIFE || knife_model[id] < 3)
        return 
PLUGIN_CONTINUE
    
else if(knife_model[id] == 3)
        
Speed get_pcvar_float(CVAR_HIGHSPEED)
    else if(
knife_model[id] == 4)
        
Speed get_pcvar_float(CVAR_LOWSPEED)
    
    
set_user_maxspeed(idSpeed)
    
    return 
PLUGIN_HANDLED   


Last edited by wTf.; 01-13-2014 at 09:38.
wTf. is offline
 



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 10:04.


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