Closed valerboss closed 9 years ago
Unless the server response codes have changed, that shouldn't happen. The script only stops execution (and pops up the normal error message) when you get specific errors: 25 (the room is full, and this will continue looping if the option is checked on the screen), 28 (you have previously left this room and cannot rejoin), or 24, a generic error with a message which can tell you the room is too high a level or the room is full (again, the latter can be bypassed by the option checkbox).
In any situation except for those listed, the script will continue to try joining the room until you get it, one of the above conditions occurs, or you click the stop button.
If you are getting a different error for a connection timeout that is stopping the autojoin, would you be able to get the log from the console so I can try and figure out what is going on? Thanks!
Here's a log from console (its end):
POST http://steamcommunity.com/minigame/ajaxjoingame/ 400 (Bad Request) 24 Error joining game 47090: There was a problem trying to join the game: it already has the maximum number of players. (387) Joining room 47090 [47090] POST http://steamcommunity.com/minigame/ajaxjoingame/ 400 (Bad Request) 24 Error joining game 47090: There was a problem trying to join the game: it already has the maximum number of players. (388) Joining room 47090 [47090] POST http://steamcommunity.com/minigame/ajaxjoingame/ 400 (Bad Request) 24 Error joining game 47090: There was a problem trying to join the game: it already has the maximum number of players. (389) Joining room 47090 [47090] POST http://steamcommunity.com/minigame/ajaxjoingame/ net::ERR_CONNECTION_TIMED_OUT Uncaught SyntaxError: Unexpected end of input
Checkbox to bypass errors is marked. When error happens scripts stops working.
Interesting, thanks for the log. I'm handling the errors that are returned by the ajax API, but what you were seeing is that command itself timing out (and there are no actual errors being returned).
The latest version (3.3) of the script should catch those errors as well and continue trying even if the command times out. I don't have the ability to "fake" a timeout error so I can't really test it, but let me know if that works for you. Thanks!
Thank you for help!
I'm sorry for closing issue before testing. But it happens again (I loaded my connection with opening torrents and running online video to test it) Here's more detailed log:
POST http://steamcommunity.com/minigame/ajaxjoingame/ net::ERR_CONNECTION_TIMED_OUT send @ jquery-1.11.1.min.js?v=.isFTSRckeNhC:4 m.extend.ajax @ jquery-1.11.1.min.js?v=.isFTSRckeNhC:4 m.(anonymous function) @ jquery-1.11.1.min.js?v=.isFTSRckeNhC:4 JoinGameLoop @ VM794:25 HandleJoinError @ VM795:65 (anonymous function) @ VM794:39 j @ jquery-1.11.1.min.js?v=.isFTSRckeNhC:2 k.fireWith @ jquery-1.11.1.min.js?v=.isFTSRckeNhC:2 x @ jquery-1.11.1.min.js?v=.isFTSRckeNhC:4 b @ jquery-1.11.1.min.js?v=.isFTSRckeNhC:4 Failed to join game 47090 Uncaught SyntaxError: Unexpected end of input
The new code logs the error, but then calls the script again to start over. Is that not happening on your end?
catch(e) { console.log(e); JoinGameLoop(rooms, count+1); }
Yep, on the last error it stops trying to join.
Hrm, the ajax call is in the try{}
block and should be caught and relaunched there. I'll keep looking at it
Is there any way to fix it?