Raised This Month: $ Target: $400
 0% 

Debug Error in HLDS Console


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 10-06-2009 , 13:20   Debug Error in HLDS Console
Reply With Quote #1

L 10/06/2009 - 22:49:06: Invalid player id 0
L 10/06/2009 - 22:49:06: [AMXX] Run time error 10 (plugin "match.amxx") (native "get_user_weapon") - debug not enabled!
L 10/06/2009 - 22:49:06: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).

PHP Code:
public event_new_round() {
    if(
g_KnifeRound && !get_pcvar_num(kr_teamvote)) {
        
g_KnifeRound false
    
}
}

public 
cur_weapon() {
    if(
g_KnifeRound) {
        
engclient_cmd(0,"weapon_knife")
    }
}

public 
CmdRestartRound(idlevelcid) {
    if (!
cmd_access(idlevelcid1)) return PLUGIN_CONTINUE
    g_KnifeRound 
false
    server_cmd
("sv_restartround 1")
    return 
PLUGIN_CONTINUE
}

public 
CmdKnifeRound(id,level,cid) {    
    if(!
cmd_access(id,level,cid,1)) return PLUGIN_CONTINUE
    server_cmd
("sv_restartround 1")    
    
set_task(2.0"KnifeRoundStart"id)
    
ColorChat(0RED"[KR] Kniferound is started!")
    
ColorChat(0RED"[KR] Kniferound is started!"
   
    return 
PLUGIN_CONTINUE
}

public 
CmdSwapTeams(id,level,cid) {
    if(
cmd_access(id,level,cid,1)) {
        
g_KnifeRound false
        SwapTeams
()
    }
}

public 
KnifeRoundStart(id) {
    
g_KnifeRound true;
    for(new 
033i++)
    {
        new 
weapon get_user_weapon(id)
        if (
weapon != CSW_KNIFE && is_user_alive(i)) 
            
engclient_cmd(i"weapon_knife")
    }
public 
fwd_CmdStart_pre(iduc_handle) {
    if(
g_KnifeRound && get_pcvar_num(kr_noslash) == 1) {
    static 
button;
    
button get_uc(uc_handleUC_Buttons);
    if(
button IN_ATTACK)
    {
        
button &= ~IN_ATTACK;
        
button |= IN_ATTACK2;    
    }
    
set_uc(uc_handleUC_Buttonsbutton);
    return 
FMRES_SUPERCEDE;
    }
    return 
FMRES_IGNORED;

THERE IS DEBUGGING ERRORS IN CONSOLE OF HLDS CAN SOME1 CORRECT IT
lordshiva is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-06-2009 , 13:23   Re: Debug Error in HLDS Console
Reply With Quote #2

You are calling native get_user_weapon with an index of 0 which isn't a player entity that the native would require. Also you haven't enabled the debug mode, which I believe would be pretty smart.
SnoW is offline
Send a message via MSN to SnoW
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 10-06-2009 , 13:24   Re: Debug Error in HLDS Console
Reply With Quote #3

Than can u plz correct my code
lordshiva is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-06-2009 , 13:26   Re: Debug Error in HLDS Console
Reply With Quote #4

No. You have to enable the debug mode and read the line which you get. What is funny is that the line is the line in your code where the error is. Don't know how that's possible but...
SnoW is offline
Send a message via MSN to SnoW
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 10-06-2009 , 13:28   Re: Debug Error in HLDS Console
Reply With Quote #5

SNOW man how to enable Debugging and also plz CORRECT MY CODE if u know.........
lordshiva is offline
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 10-06-2009 , 13:30   Re: Debug Error in HLDS Console
Reply With Quote #6

This is plugin which goes like this

whn amx_match is typed than players only get knife and r not allowed to buy any other weapons.........KNIFING ROUND
lordshiva is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-06-2009 , 13:30   Re: Debug Error in HLDS Console
Reply With Quote #7

It's in here:
PHP Code:
KnifeRoundStart(id
You can debug by adding " debug" after the plugin name in plugins.ini.
Code:
 match.amxx debug

Last edited by SnoW; 10-06-2009 at 13:34.
SnoW is offline
Send a message via MSN to SnoW
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 10-06-2009 , 13:38   Re: Debug Error in HLDS Console
Reply With Quote #8

What i ve to edit to Run plugin without Debugging
lordshiva is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-06-2009 , 13:46   Re: Debug Error in HLDS Console
Reply With Quote #9

Quote:
Originally Posted by lordshiva View Post
What i ve to edit to Run plugin without Debugging
Remove the "debug"?
SnoW is offline
Send a message via MSN to SnoW
lordshiva
BANNED
Join Date: Aug 2009
Location: Heaven
Old 10-07-2009 , 00:50   Re: Debug Error in HLDS Console
Reply With Quote #10

EXOLENT[NJR] Can u correct my above codeee
lordshiva 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 22:42.


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