Raised This Month: $ Target: $400
 0% 

[SOLVED] get_pcvar_num native error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Choose_Your_Destiny
Senior Member
Join Date: May 2011
Old 08-24-2013 , 11:22   [SOLVED] get_pcvar_num native error
Reply With Quote #1

Hi guys,

i don't know what is the problem

but, show this error in console

Code:
L 08/24/2013 - 18:18:38: [AMXX]    [0] xpmod.sma::show_explevel (line 269)
L 08/24/2013 - 18:18:38: Invalid CVAR pointer
L 08/24/2013 - 18:18:38: [AMXX] Displaying debug trace (plugin "xpmod.amxx")
L 08/24/2013 - 18:18:38: [AMXX] Run time error 10: native error (native "get_pcvar_num")
this code:

PHP Code:
public show_explevel(id){
    if(!
is_user_alive(id)){
        return 
PLUGIN_HANDLED;
    }
    
    new 
ly[33],ey[33],as[33],show[33];
    as[
id] = get_pcvar_num(xpm_start) + (seviye[id] * get_pcvar_num(xpm_inc));
    
ly[id] = seviye[id] * 100 get_pcvar_num(xpm_maxlevel) ;
    
ey[id] = exp[id] * 100 / as[id];
    
    
set_hudmessage255000.020.2006.03.00.11.5 );
    
ShowSyncHudMsg(idhud_show,"Exp/Level" );
    
set_hudmessage2552552550.020.2306.03.00.11.5 );
    
ShowSyncHudMsg(idhud_info"Level: [%d/%d] - (%s%i) ^nExp: [%i/%i] - (%s%i)",seviye[id],get_pcvar_num(xpm_maxlevel),is,ly[id],exp[id],g_exp(id),is,ey[id],show);
    return 
PLUGIN_HANDLED;

What is the problem?

thnx in advance.
__________________
I wouldn’t marry you even if you were the last woman left on earth

Choose_Your_Destiny is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-24-2013 , 13:28   Re: get_pcvar_num native error
Reply With Quote #2

Show where the variable is initialized and set using register_cvar().
__________________
Black Rose is offline
Old 08-25-2013, 03:34
Choose_Your_Destiny
This message has been deleted by Choose_Your_Destiny. Reason: nvm
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-25-2013 , 04:00   Re: get_pcvar_num native error
Reply With Quote #3

Is the error spamming logs ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Choose_Your_Destiny
Senior Member
Join Date: May 2011
Old 08-25-2013 , 05:26   Re: get_pcvar_num native error
Reply With Quote #4

i don't know.

i know only doesn't work.

good compile, but doesn't work that code.
__________________
I wouldn’t marry you even if you were the last woman left on earth

Choose_Your_Destiny is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-25-2013 , 08:33   Re: get_pcvar_num native error
Reply With Quote #5

The problem is that commandThunderOn() is never found, so plugin_init() halts after this line "register_clcmd("+simsek", "commandThunderOn");"
If you comment it out it will remove the error and the xp display will work, but I get a lot of other runtime errors instead.

If you're gonna make plugins, learn to debug.

Also, this is not allowed (and probably disabled in the latest update):
Code:
client_cmd(id, "bind v none");
client_cmd(id, "bind v ^"+simsek^"");
client_cmd(id, "messagemode __xpm_maxlevel");
client_cmd(id, "messagemode __xpm_kill");
client_cmd(id, "messagemode __xpm_inc");
client_cmd(id, "messagemode __xpm_headshot");
client_cmd(id, "messagemode __xpm_knife");
client_cmd(id, "messagemode __xpm_damage_up");
client_cmd(id, "messagemode __xpm_heal_up");
__________________
Black Rose is offline
Choose_Your_Destiny
Senior Member
Join Date: May 2011
Old 08-25-2013 , 09:44   Re: get_pcvar_num native error
Reply With Quote #6

Quote:
Originally Posted by Black Rose View Post
The problem is that commandThunderOn() is never found, so plugin_init() halts after this line "register_clcmd("+simsek", "commandThunderOn");"
If you comment it out it will remove the error and the xp display will work, but I get a lot of other runtime errors instead.

If you're gonna make plugins, learn to debug.

Also, this is not allowed (and probably disabled in the latest update):
Code:
client_cmd(id, "bind v none");
client_cmd(id, "bind v ^"+simsek^"");
client_cmd(id, "messagemode __xpm_maxlevel");
client_cmd(id, "messagemode __xpm_kill");
client_cmd(id, "messagemode __xpm_inc");
client_cmd(id, "messagemode __xpm_headshot");
client_cmd(id, "messagemode __xpm_knife");
client_cmd(id, "messagemode __xpm_damage_up");
client_cmd(id, "messagemode __xpm_heal_up");

Thnx man
__________________
I wouldn’t marry you even if you were the last woman left on earth

Choose_Your_Destiny 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 19:04.


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