AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [INC] loghelper (updated 2010-05-27) (https://forums.alliedmods.net/showthread.php?t=100084)

Nerus 12-21-2015 04:54

Re: [INC] loghelper (updated 2010-05-27)
 
1 Attachment(s)
Hi, I attached new fixed version working correct with SM 1.7.3.

Changes: deprecated GetClientAuthString to GetClientAuthId.

Regards,
Nerus.

psychonic 12-21-2015 07:46

Re: [INC] loghelper (updated 2010-05-27)
 
Quote:

Originally Posted by Nerus (Post 2374722)
Hi, I attached new fixed version working correct with SM 1.7.3.

Changes: deprecated GetClientAuthString to GetClientAuthId.

Code:

        //if (!GetClientAuthString(client, player_authid, sizeof(player_authid)))
        if(GetClientAuthId(client, AuthId_Steam3, player_authid, sizeof(player_authid)))

It looks like you negated the check here, so everyone's auth string in the log will be "UNKNOWN" (or whatever is in the uninitialized buffer on failure). Also, to match the game's own logging on every game, it should be AuthId_Engine instead of AuthId_Steam3.

There are 10 other instances to change as well, not just that one. If it wasn't throwing warnings, it's because stock functions are only compiled in if used, else the compiler ignores them.

psychonic 12-21-2015 11:28

Re: [INC] loghelper (updated 2010-05-27)
 
Quote:

Originally Posted by psychonic (Post 2374760)
Code:

        //if (!GetClientAuthString(client, player_authid, sizeof(player_authid)))
        if(GetClientAuthId(client, AuthId_Steam3, player_authid, sizeof(player_authid)))

It looks like you negated the check here, so everyone's auth string in the log will be "UNKNOWN" (or whatever is in the uninitialized buffer on failure). Also, to match the game's own logging on every game, it should be AuthId_Engine instead of AuthId_Steam3.

There are 10 other instances to change as well, not just that one. If it wasn't throwing warnings, it's because stock functions are only compiled in if used, else the compiler ignores them.

I've updated the first post now with all of the GetClientAuthString instances replaced properly.

mrkos9i4ok 04-14-2017 14:09

Re: [INC] loghelper (updated 2010-05-27)
 
help pls
Error:
//// smctf.sp
// C:\Users\Faust-PC\Desktop\═ютр* яряър\include\loghelper.inc(6) : error 010: invalid function or declaration
// C:\Users\Faust-PC\Desktop\═ютр* яряър\include\loghelper.inc(10) : error 001: expected token: ";", but found "-identifier-"
// C:\Users\Faust-PC\Desktop\═ютр* яряър\include\loghelper.inc(10) : error 017: undefined symbol "insmod"
// C:\Users\Faust-PC\Desktop\═ютр* яряър\include\loghelper.inc(10) : error 010: invalid function or declaration
// C:\Users\Faust-PC\Desktop\═ютр* яряър\include\loghelper.inc(10 -- 12) : fatal error 127: too many error messages on one line
//
// Compilation aborted.
// 5 Errors.
//
// Compilation Time: 0,8 sec
// ----------------------------------------


All times are GMT -4. The time now is 11:56.

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