Closed ghost closed 12 years ago
Thanks for the hint on the website bug.
The timeout seems to indicate that the GoldSrc master server makes trouble once again. I'll have a look.
in the same example, it will also fail at server = GoldSrcServer.new(*servers.choice) choice is undefined as well.
Well, #choice
is a standard Ruby method for Array
s. It exists since 1.8.7, so you should either update or use something like this:
server = GoldSrcServer.new(*servers[rand server.count])
I won't update the example for that though. Ruby 1.8.6 is really outdated now.
My bad. Choice was renamed (and not aliased) to sample in Ruby > 1.8.7.
Oh, that's a bit different story than, maybe I'll change it so it works on 1.9, 1.8.7 and 1.8.6.
Sorry, I can't do anything about the master server problems, I think.
I'll have a look at it though and ask on the HLDS list.
On the usage page on the website, it says to query master servers in ruby:
master = MasterServer.new(_MasterServer::GOLDSRC_MASTER_SERVER) servers = master.get_servers server = GoldSrcServer.new(_servers.choice)
However...