Raised This Month: $32 Target: $400
 8% 

Steam_GroupStatusResult Forward can be called with client == -1


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 11-15-2012 , 19:25   Steam_GroupStatusResult Forward can be called with client == -1
Reply With Quote #1

Hi there !

I'm testing Steam Groups forward in my whitelist plugin and I just got a problem with the fact that the "client" (first arg) value was -1.

Looking at http://hg.limetech.org/projects/stea.../extension.cpp, I feel like you shouldn't launch the forward (do we say "trigger", "execute", "launch" or "call" a forward ?) if i == -1. I guess it's logic that player that left the server doesn't have the Forward "forwarded" for them (it is what I assumed when starting to use your extension; since for example, if two clients left, it's impossible that you wouldn't know which one the forward concerns.).

Also, if you don't want to fix that, then please at least mention in the .inc that the Forwards can have a "client" arg of value "-1".

Thanks for this great SP interface,

Red
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 11-15-2012 at 20:00.
RedSword is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-15-2012 , 19:44   Re: Steam_GroupStatusResult Forward can be called with client == -1
Reply With Quote #2

Quote:
Originally Posted by RedSword View Post
And then L520 "if (i > playerhelpers->GetMaxClients())" is true (1 > 0), which makes i == -1; and then the forward is triggered.
Where would you get the idea that playerhelpers->GetMaxClients() would return 0? It'd return whatever the server's maxplayers is set to. Which on both of my TF2 servers would be 24.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 11-15-2012 , 19:46   Re: Steam_GroupStatusResult Forward can be called with client == -1
Reply With Quote #3

Wtf; I misread code; I'll update my main post :$.

Thanks :$.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 11-15-2012 at 19:52.
RedSword is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-15-2012 , 22:06   Re: Steam_GroupStatusResult Forward can be called with client == -1
Reply With Quote #4

This is expected behaviour and documented (although only in the thread when it was added, as that part of the include doesn't have inline documentation written yet).

-1 corresponds to the value of USE_CUSTOM_STEAMID, and is informing you to use the Steam_GetCustomSteamID native to retrieve the SteamID the response is for - this'll happen in cases where SteamTools couldn't find the client on the game server (either someone did a request for a manually specified SteamID, or a client left the server before the response was received).
__________________
asherkin is offline
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 11-16-2012 , 08:08   Re: Steam_GroupStatusResult Forward can be called with client == -1
Reply With Quote #5

I suggest you modify your .inc to inform people of this. And I had no idea native bool:Steam_GetCustomSteamID(String:renderedID[], maxlength) had an usage; thanks for the tip.
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work
RedSword is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-16-2012 , 08:46   Re: Steam_GroupStatusResult Forward can be called with client == -1
Reply With Quote #6

Quote:
Originally Posted by RedSword View Post
I suggest you modify your .inc to inform people of this.
As I said, it'll be there when that part is documented.
__________________
asherkin is offline
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 05:06.


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