Closed JCKE closed 9 years ago
I need 2 people to independently test this for errors and functionality.
Uncaught SyntaxError: Unexpected token =
at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
@Page- Do you know what was being run at the time?
I used https://github.com/JCKE/steamSummerMinigame/blob/f500cbd3c558257c9f91678f9fecf3d2fe1ed265/autoPlay.js directly in the chrome console - sadly it mangles the lines so I couldn't comment directly on the offending line (not sure which one it is)
@Page- In the console, beside the error in the top-right corner, it should have some sort of token error, like VM12345:6 or something. If you don't see it, you may have to click the arrow to expand the error. If you click on the tokens, one of them should take you to the spot in the code that caused the error.
Duh, yeah, been a while since I've debugged console run code:
Uncaught SyntaxError: Unexpected token =
at Object.InjectedScript._evaluateOn (<anonymous>:895:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:828:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)
InjectedScript._evaluateOn @ VM276:895
InjectedScript._evaluateAndWrap @ VM276:828
InjectedScript.evaluate @ VM276:694
None of them go to anything useful though :S
@Page- Aha, the problem seems to be with this function:
function numAbilityInLane(abilityId, lane=g_Minigame.CurrentScene().m_nExpectedLane) {
// Checks if an ability is in use in a given lane and returns the number
var numActive = g_Minigame.CurrentScene().m_rgLaneData[lane].abilities[abilityId];
if (numActive === undefined)
return 0;
return numActive;
}
Testing in Firefox, it was fine defining an optionable parameters like this, but apparently it's the wrong way. This has basically been a crash course in JavaScript for me, so I'm not really surprised to find this haha
Aaaand today's game is done. Looks like testing will have to halt for an hour or so.
Darn! Well, I tested it a bit before the shutdown, so I'll commit that. In other news, my badge auto purchase system is almost ready!
You may want to add the LICENSE back.
Is this ready for merge? If so, I can fix the conflicts easily.
I hope so; after testing it for awhile it has yet to break on me.
Added the rest of the abilities to ITEMS dictionary, and sorted it. Created helper functions to get the percentage of your total team in a lane, and to get the number of an ability active in a lane. Helpful in deciding if an ability would have the greatest impact in a lane.
Created revive ability policy, reviving if the lane has > 20% of total players and > 33% of the lane players are dead. Some sites incorrectly say revive affects all lanes, but thorough testing says otherwise. Modified medic policy to also look at the team's overall health (just looking at the 10 buckets of the histogram) and react even if the player's health is above 50%. Medic policy now looks at pumped up ability first, as it is basically a superior medic.
Things that could be tweaked/changed: