Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
before i introduce my issue i want to give a little rundown on the project. It gets a list of names from a file (latest.log) and filters out the usernames and looks up the stats for them and sends the stats to an electron app that displays the stats via a table.

PROBLEM - For the search bar on the electron app, i want to be able to look up players and return the stats of the player in the table (just like before). I thought that using pretty much the same code as before would work (with a little tweaking) and it didn't. It seems to run fine as i get no error alert but the playerstats wont show on the table.

If you want to run the whole projects, just replace filePath with the path to your minecraft .log file. You do not need to do anything if you want to test out the searh bar.

code for project:GitHub - 2emk7/chan-bedwars-overlay: chan is a bedwars overlay.[^]

What I have tried:

Ive tried multiple versions of the code for the getPlayerStats function but they all don't work. I dont get an error code either when i run it. I also tried moving the code to the html doc but i need the two following in the same document for it to work:

const hypixel = new Hypixel.Client('77684239-5a07-4ea4-bc9c-2f07db9fddb7');
const player = await hypixel.getPlayer(inputValue);

and i get an error when i try to put the definition of hypixel in the html document.
Posted
Comments
Afzaal Ahmad Zeeshan 27-Jan-23 3:07am    
What error do you get?

Best would be to put a console.log around the method call to see how far the code has executed.
coalwork 27-Jan-23 15:32pm    
getting an error now if this can help:

node:13588) UnhandledPromiseRejectionWarning: Error: An object could not be cloned.
at t.ipcRendererInternal.send (node:electron/js2c/renderer_init:2:11558)
at EventEmitter. (node:electron/js2c/renderer_init:2:11030)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900