Raised This Month: $ Target: $400
 0% 

[SOLVED] Invalid Cvar Pointer


Post New Thread Reply   
 
Thread Tools Display Modes
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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-13-2014 , 09:41   Re: Invalid Cvar Pointer
Reply With Quote #2

get_cvar_pointer("sv_gravity 500")

Do you think there is a cvar named "sv_gravity 500" ?
__________________
Arkshine is offline
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 01-13-2014 , 09:46   Re: Invalid Cvar Pointer
Reply With Quote #3

is this going to be?

get_cvar_pointer("sv_gravity", 500)
wTf. is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 01-13-2014 , 09:49   Re: Invalid Cvar Pointer
Reply With Quote #4

Just get_cvar_pointer("sv_gravity");
__________________
What are you looking for here?
DavidJr is offline
wTf.
Senior Member
Join Date: Aug 2011
Location: This important?
Old 01-13-2014 , 09:57   Re: Invalid Cvar Pointer
Reply With Quote #5

Hmm ok thnx
wTf. is offline
Reply



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