Raised This Month: $12 Target: $400
 3% 

[INC] debug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-22-2017 , 04:46   [INC] debug
Reply With Quote #1

Description With this inc file you have a functions to print debug messages, using a debug message you can extract data from server or you can solve problems, depends on your needs.

Credits

PRoSToTeM@
BlackRose
PartialClonning
ConnorMcLeod
Addonszzz
Emp'


Code example for testing...
PHP Code:
#include <amxmodx>
#include <debug>

public plugin_init()
{
    
debug_log(5"Plugin Init called" );

    
register_clcmd"test""ptest" );
}

public 
ptest(id)
{
    
debug_log(5"ptest(id) Called!" );

    if( 
is_user_alive(id) )
    {
        
debug_log(5"is_user_alive succesfully filtred!" );
        
// your code here.
    
}

Documentation Is inside of the file but if you have any question you can reply on this thread.
Attached Files
File Type: inc debug.inc (4.3 KB, 179 views)

Last edited by Craxor; 06-23-2017 at 18:53.
Craxor is offline
Send a message via ICQ to Craxor
shehzad1234
BANNED
Join Date: Jan 2016
Location: https://t.me/pump_upp
Old 05-22-2017 , 11:18   Re: debug.inc
Reply With Quote #2

Gj.
shehzad1234 is offline
Send a message via ICQ to shehzad1234 Send a message via AIM to shehzad1234 Send a message via Yahoo to shehzad1234
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-22-2017 , 14:13   Re: debug.inc
Reply With Quote #3

Quote:
Originally Posted by shehzad1234 View Post
Gj.
Thank you.

------

Code updated.
Craxor is offline
Send a message via ICQ to Craxor
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-23-2017 , 12:41   Re: debug.inc
Reply With Quote #4

Updateddddddddddddd!
Craxor is offline
Send a message via ICQ to Craxor
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 05-23-2017 , 13:54   Re: debug.inc
Reply With Quote #5

What is the purpose of caps in function names?
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-23-2017 , 14:18   Re: debug.inc
Reply With Quote #6

What kind of Caps
Craxor is offline
Send a message via ICQ to Craxor
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-23-2017 , 14:45   Re: debug.inc
Reply With Quote #7

this is not caps
THIS IS CAPS

__________________

Last edited by OciXCrom; 05-23-2017 at 14:46.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 05-23-2017 , 14:54   Re: debug.inc
Reply With Quote #8

Maybe his choices or style. I don't see any issue with CAPS functions.

Also,

PHP Code:
stock bool:IS_DEBUG_ENABLED)
{
    if( 
)
    {
        return 
true;
    }
    return 
false;

What that stock is used for?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 05-23-2017 at 14:56.
EFFx is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 05-23-2017 , 14:56   Re: debug.inc
Reply With Quote #9

aaa, yyes funny, is just a style as EFFX said.

Edit: about effx question, you can make a macro inside of plugin to check if debug is enabled, example:
PHP Code:
#define DEBUG 1 
And then use the function to check for debug before call debug_init or any debug stock:
PHP Code:
if( IS_DEBUG_ENABLEDDEBUG ) )
{
    
DEBUG_INIT();


Last edited by Craxor; 05-23-2017 at 15:05.
Craxor is offline
Send a message via ICQ to Craxor
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 05-23-2017 , 16:52   Re: debug.inc
Reply With Quote #10

Code:
/* Don't use it ... it is for the DEBUG_LOG stock */ stock get_dbg_info( Format[], szString[], maxchars=0 )
Maybe make it static then?
And this too:
Code:
new const DBG_INFO[] = "[Map: %s, Time: %i:%i] %s";
You also should make it stock or move it inside get_dbg_info.
__________________

Last edited by PRoSToTeM@; 05-23-2017 at 16:54.
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Reply


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 14:38.


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