rumblefrog / go-a2s

Golang implementation of Source Query
MIT License
66 stars 16 forks source link

client.PlayerInfo() not working? #1

Closed DylanMeeus closed 5 years ago

DylanMeeus commented 5 years ago

Hello,

I've got some trouble getting PlayerInfo to work. I'm using it like this (I abreviated the code a bit):

func x() {
    client, _ := a2s.NewClient(ip)
    defer client.Close()
    info, _:= client.QueryInfo() 
    fmt.Printf("%v\n", info) // returns the correct data
    players, err := client.QueryPlayer()
    fmt.Printf("%v\n", players) // returns nil (even though there are players)
}

The error shows "Bad Player Reply". But I'm not sure how to further interpret this?

Some further information:

I've tried this on multiple CS:S servers. QueryInfo always worked but QueryPlayer did not.

I looked through your code and I can't see anything wrong with it. Have you verified this code against CS:S servers?

I'd gladly help you debug this in any way I can. And thank you for making this library btw, it's cool ;-)

rumblefrog commented 5 years ago

No I have not tried on CSS server, but I'll look into it

DylanMeeus commented 5 years ago

I'm closing this issue. Upon investigating further, I don't think the problem is in the library but rather with the setup of the specific servers. (Some CS:S servers worked fine, others didn't. The ones that did not were from the same group of people)

rumblefrog commented 5 years ago

The only thing incompatibility I'm aware of with the SRCD engine is with CSGO; I'm not aware of any others ATM.