Results 1 to 5 of 5

Thread: Enable debug-comments /##/

  1. #1
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts

    Enable debug-comments /##/

    Hey,

    I just forgot how to enable the debug comments /##/ (if it was even possible to begin with).
    I don't want to clutter the mod with if( debug ) printf();

    I have tested it with /developer 1 and /developer 2 and this short function, however I never saw the COMMENT print:

    PHP Code:
    test()
    {
    /
    # printf( "COMMENT\n" ); #/
    printf"TEST\n" );


  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    dprint/dprintf i think is a printf for developer 1/2
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by IzNoGoD View Post
    dprint/dprintf i think is a printf for developer 1/2
    Thanks, I'll use that for now.

    But still, possible debug computations can only be wrapped in /##/

  4. #4
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    dprint/dprintf aren't functions

    however starting the server with +set developer_script 1 enables the /##/ comments, print()/println() and assert() functions

    (I just forgot about developer_script)

    I use +set developer_script 1 +set developer 2 +set debug 1, dont know if its a combination of them, or just a siingle one, hoewver it works, and im happy with it

  5. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Ah, it's com_dprintf in c/c++ source. Not extended to gsc yet.

    Try this if you really need it:
    PHP Code:
    dprintf(str)
    {
        if(
    getcvarint("developer"))
            
    printf(str);

    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •