ensingm2/saliengame_idler

Stopped at planet selection

JeanPaulLucien opened this issue · 17 comments

Script stopped at planet selection and do nothing. Worked again when I selected a planet manually. Reload of the page with game didn't help.

What the console log looked like ? I never had this issue so it'd help to know how it happened exactly.
Generally it's the LeaveGameInstance() function that doesn't work due to the error() function inexistant in Valve's code, not JoinPlanet() that fails. I assume it's very rare. Maybe we should add a call to INJECT_init() in checkUnlockGameState() @ensingm2 ?
Edit : Nope. In fact it's already a case that is taken into account with if(gGame.m_State instanceof CPlanetSelectionState) join_planet_helper(planet_id); in INJECT_switch_planet().

In console.log was 'At planet selection' string the last. I didn't save other strings. But there was not error, just logs from script. I can't say when script stopped 'cause was afk.

Do you know how long it was stopped ? If it was more or less than 5 minutes. The case is supposedly already taken into account in the code. The only optimal missing part would be to handle errors while leaving a planet and joining one as the error handling in the Valve's code isn't really great for what we want (not even including the nonexistent error() function). Like adding some attempts in case LeaveGameInstance / JoinPlanet fails.

If it will be again, I'll check it better.

Thanks. If the case happens again, try to let it for at least 5 minutes. You should see something like Detected the game script is locked. Trying to unlock it. at some point and it should solve that.

I think it was long time, because for 14 hours I even didn't get new level (current is 15)

This happens quite often, but it's usually on Valve's end, not the scripts. The error received for me in Chrome is:
etwork.js?v=-I0NyI7sLjXf&l=english:262 Uncaught ReferenceError: error is not defined at Object.<anonymous> (network.js?v=-I0NyI7sLjXf&l=english:262) at j (jquery-1.11.1.min.js?v=.isFTSRckeNhC:2) at Object.fireWith [as resolveWith] (jquery-1.11.1.min.js?v=.isFTSRckeNhC:2) at x (jquery-1.11.1.min.js?v=.isFTSRckeNhC:4) at XMLHttpRequest.b (jquery-1.11.1.min.js?v=.isFTSRckeNhC:4)

But even if I refresh and try to manually move to another planet, it does not work. Trying the same inside the Steam Client also results in the same.

This can probably be closed.

Yeah, thinking this is the same issue as #61. I'm gonna look into it cause it's becoming more and more of an issue.

This happend again after a planet was finished. I reload the page in last moment. And after script started I see planets, including wen. Script does nothing. Waited 5 minutes.

In console there is no error. Only console messages:
Got access token:
clicking button
CGame
GUI Has been created
Initializing Planet Selection Menu.
At Planet Selection

It doesn't call Best Zone func.

Also seeing this same issue as @JeanPaulLucien above. If you're not already on a planet, CheckSwitchBetterPlanet is not called anymore it seems. Going to look into it after #61.

Fixed not running CheckSwitchBetterPlanet() on pasting script into planet selection, or main menu while not at a planet. Still need to fix #61. Or I have a fix rather, just waiting on being able to test it.

@ensigm2, worked. Thanks. Does it use way to change the planet?

There is side effect from #84. Script doesn't stop and returns to zone, if user visited a planets screen manually. May it is reproducable for my case. Hope, this fix will work on the next finizhed planet.

Yes, that issue has already been documented in #83, and was an issue before the previous fix. Please try to keep discussion to the issue posted in the OP.

Reverted my fix here as it broke auto-switching.

@ensingm2 , yes, I see dialog window "Join Planet Error", but script continues to work well. What about to fix it by if at Switch? May hide it automatically, if user did nothing. I clicked on this dialog and there is no effect, it's dummy.

There were several #61 errors in the last hours 1 or 2 after each boss, but without doing anything it works perfectly at least on my side. checkUnlockGameState() is triggered and it unstuck the script.
Each time you got this issue, did you try something manually ?