gmsv_furryfinder- broken?

Hi everyone. Im working on a script that involves checking a player’s membership to a certain steam group. Problem is, Seems as if the only module that can help me do this (gmsv_furryfinder) is currently broken, and will most likely stay broken, so says Azu.
Anyways, Does anyone know of any other way to do this? Im surprised there’s not more on the subject. Does anyone have a fixed version of the module?

The last time I tried it (less than a week ago), it worked. Unless a (very) recent update broke it, you should be able to use it. Care to post your code?

[lua]
include(“autorun/server/sv_riotgroupbenefits.lua”)
if ( !require( “furryfinder” ) ) then return end
local playerMeta = FindMetaTable( “Player” )
if ( !playerMeta ) then return end

local function GetPlayerBySteamID( steamid )
for _, v in ipairs( player.GetAll() ) do
if ( v:SteamID() == steamid ) then
return v
end
end
return nil
end

function playerMeta:RequestGroupStatus( group )
return furryfinder.RequestGroupStatus( self:SteamID(), group )
end

function playerMeta:IsGroupMember( group )
if ( !self.GroupStatus || !self.GroupStatus[ group ] ) then
return nil // unknown case, haven’t requested yet
end

return self.GroupStatus[ group ].IsMember

end

function playerMeta:IsGroupOfficer( group )
if ( !self.GroupStatus || !self.GroupStatus[ group ] ) then
return nil // unknown case, haven’t requested yet
end

return self.GroupStatus[ group ].IsOfficer

end

hook.Add( “PlayerAuthed”, “GroupPlayerAuthed”, function( ply, steam, uniqueid )
/// request group status here
if ply:RequestGroupStatus( “103582791432403642” /
RIOT // ) then
print(“Player “… ply:Nick() …” VERIFIED group member”)
else
print(“Player “… ply:Nick() …” is not a group member”)
end*/
end )
hook.Add( “PlayerInitialSpawn”, “GroupPlayerCheck”, function( ply, steam, uniqueid )
if ply:RequestGroupStatus(“103582791432403642”) then
ply:ChatPrint(“Thanks for being part of the RIOT steam group!”)
else
ply:ChatPrint(“Join the riot group :c”)
end
end )

hook.Add( “GSGroupStatus”, “GMTGroupStatus”, function( steamUser, steamGroup, isMember, isOfficer )

local ply = GetPlayerBySteamID( steamUser )
 
if ( !ply ) then return end
 
if ( !ply.GroupStatus ) then
    ply.GroupStatus = { }
end
 
ply.GroupStatus[ steamGroup ] = 
{
    Group = steamGroup,
    IsMember = isMember,
    IsOfficer = isOfficer,
}

end )
[/lua]
Maybe i’m just fumbling on the topic of installing the module correctly. currently fiddling around with the install files. This code returns the “FurryFinder: RequestGroupStatus failed. GS context not initialized” error.

[editline]29th July 2012[/editline]

Oh wow.
Yeah, i was right. i was fumbling around with the install files, not knowing what i was doing half of the time. the gmsv_furryfinder.dll is different in the bin folder and modules folder, and i mixed them up thinking they were the same thing.
Thanks anyways, sorry to waste all of your time. Maybe someone else can see this and find a solution.

One more thing, it seems to still be broken on a listen server or a singleplayer game. Dedicated servers work fine though.

–Edit AGAIN, Apparently the install i suggested wasn’t how it should be installed. The problem persists after i put this on a VDS. There’s something im missing while installing, since my code is fine.
Can someone give me a small walkthrough on how it is to be installed correctly?
(I put the bin files from the svn in garrysmod/bin, and VoiDeD’s single module file into lua/includes/modules. Keeps whacking out and giving that RequestGroupStatus failed message.)

bump, because editing apparently doesnt do shit to grab attention.

I’m not entirely sure what you mean by “bin files”, as the module consists of a single dll you have to place into lua/includes/modules.

Does the server print “RequestGroupStatus failed. GS context not initialized.” every time you make a request?

[editline]29th July 2012[/editline]

Also, another thing to note about your code: the return value of RequestGroupStatus doesn’t indicate if the user is a member of a group or not, it only tells you if the request was successfully sent to steam. You need to handle the result in the GSGroupStatus callback.

so i would use
[lua]
ply:IsGroupMember(“103582791432403642”)
[/lua]
To return a true or false if the player is a member of the group?

Also, im using the “bin files” from the gmodmodules SVN. think it would mess things up? Your module is in the right place.

And yes, it does give me that error every time i make a request.

Yes, you use IsGroupMember, and you also don’t need the “bin files”, the module inside lua/includes/modules is all that is needed for it to work. Your code isn’t using IsGroupMember, it’s using RequestGroupStatus, which just sets the variable of the groups on the player. IsGroupMember checks the variable, which is what you should be using.

I’m unable to reproduce your issue, everything is working fine on my side.

Using this code in autorun, I get this output as expected:



Client "√oiDeD" connected (192.168.1.101:27005).
Player joined, requesting...
103582791432294076:
                Group   =       103582791432294076
                IsMember        =       true
                IsOfficer       =       true


Edited the two hooks:
[lua]
hook.Add( “PlayerAuthed”, “GroupPlayerAuthed”, function( ply, steam, uniqueid )
// request group status here
ply:RequestGroupStatus( “103582791432403642”)
end)
hook.Add( “PlayerInitialSpawn”, “GroupPlayerCheck”, function( ply, steam, uniqueid )
if ply:IsGroupMember(“103582791432403642”) then
if ply.perked then
ply:ChatPrint(“Thanks for being part of the RIOT steam group!”)
else
GivePerk(ply)
ply:ChatPrint(“gives points Thanks!”)
end
else
ply:ChatPrint(“You are not in the Riot Servers Steam Group! Did you know you can get an extra 1,000 points for joining?”)
end
if !ply:IsGroupMember(“103582791432403642”) and ply.perked then
ply:ChatPrint(“We see you’ve left the group! Dont you want to be around for all the action?”)
end
end )
[/lua]
Same error.
“RequestGroupStatus failed. GS context not initialized.”
Says it’s line 50, which is this func:
[lua]function playerMeta:RequestGroupStatus( group )
return furryfinder.RequestGroupStatus( self:SteamID(), group )
end[/lua]

Are you running your code on a dedicated server? Does the server have Steam installed by any chance?

i’m running it on a listen server right now. I haven’t tried the recent edits on my VDS yet though

[editline]29th July 2012[/editline]

“ade Gotperk table
[addons\awesome_system\lua\autorun\server\sv_riotgroupbenefitstest.lua:21] chunk has too many syntax levels”
Same code as you pasted, same line. Would this affect anything?

I don’t believe the module was ever tested to work on a listen server, due to the nature of how Steam is loaded when a client instance is present.

Try testing on a dedi.

And as for your most recent error:

Same thing on dedi.
Actually, it seems like the dedi errored once and then refused to ever error again. Im getting nothing in clientside or serverside console.