Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bot crashes with same reason #38

Closed
tanercanbilgin opened this issue Jun 6, 2022 · 7 comments
Closed

bot crashes with same reason #38

tanercanbilgin opened this issue Jun 6, 2022 · 7 comments

Comments

@tanercanbilgin
Copy link

bot_crash

i have 2 seperated rooms and sometimes one of them crashes with this error. i looked for possible reasons but i cant stop, do you have any idea

@Wazarr94
Copy link
Owner

Wazarr94 commented Jun 6, 2022

could you share the whole error message? I'm a bit confused to where it could come from. Could you also explain what happened in the room just as you got the error?

@tanercanbilgin
Copy link
Author

i never had it while playing, but as players report it suddenly crashes. when i look i always see that error

@Wazarr94
Copy link
Owner

could you share the full error message? need it to know what to fix

@tanercanbilgin
Copy link
Author

pcomp auth

after i added gk stats, my rooms crashes regularly with this error

@Wazarr94
Copy link
Owner

thanks, needed the function that called the getXPlayer function

I won't push the fix on the project directly, it might only be an issue with your modified script, but I can post here a quick fix to avoid a room crash for you. If more people report on a similar mistake, will definitely add it to the repo.

Change this, around lines 2780:

var stats = new HaxStatistics(player.name);
var pComp = getPlayerComp(player);
if (localStorage.getItem(authArray[player.id][0])) {
    stats = JSON.parse(localStorage.getItem(authArray[player.id][0]));
}
// rest of code

to this

var stats = new HaxStatistics(player.name);
var pComp = getPlayerComp(player);
if (pComp == null) return;
if (localStorage.getItem(authArray[player.id][0])) {
    stats = JSON.parse(localStorage.getItem(authArray[player.id][0]));
}
// rest of code

@tanercanbilgin
Copy link
Author

thank you so much for the help, will give a feedback after it

@tanercanbilgin
Copy link
Author

tanercanbilgin commented Jun 11, 2022

i found why is it happening, if you kick a gk while playing. bot doesnt let us pick and if we put it manual it crashes at the end

@Wazarr94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants