View Single Post
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 05-30-2018 , 11:38   Re: [ANY] ASteambot - Redirect
Reply With Quote #4

Quote:
Originally Posted by Arkarr View Post
Okay, yeah. But I don't think it's extremly important, is it ? (As in, I didn't do anything wrong, did I ?)
Anyway, updated.
Didn't do anything wrong? That depends; having it this way avoids the checking of identical Steam ID's when the GetClientAuthId returns false (e.g. if that one returns false, the StrEqual won't be executed at all), and would avoid the issue(s) similar to the one you described in STOP_IGNORING_RET_VAL warning.

You could then argue with the "performance" while doing StrEqual wouldn't be much (CPU resources and such), and that there probably wouldn't be much waste here. For the past 5 years, GetClientAuthId when introduced, and the previous GetClientAuthString had been a boolean with the documentation saying that it would return FALSE if it didn't get a proper Steam ID, there is no reasons not to check it. After all, it's only takes 6 extra characters and one to two spaces (depending on your coding "style"), to do it right. :-)
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline