dogancana / futbot

Free trade bot for Fifa 20
2 stars 1 forks source link

Fixed type error and updated api url #4

Closed stupidchen closed 5 years ago

stupidchen commented 5 years ago

2

Also add a commit for the process of xbox 360 platform(platform field of api response will be '360')

Denist79 commented 5 years ago

Hi Guys,

Does this still work? I am getting errors trying to run.

dogancana commented 5 years ago

@Denist79 , I didn't check for a while so high chance there are errors during run time. But I don't except any errors trying to run it. You can refer to this comment for running it: https://github.com/dogancana/futbot/issues/2#issuecomment-453743203

mgzam commented 5 years ago

@dogancana @Denist79 Hi all, I was trying to get this work today and it seems that there is a problem with Chrome extension. I am getting this error "Uncaught ReferenceError: webpackJsonpname is not defined"

mgzam commented 5 years ago

Following this comment : #2 (comment), I was able to make it work but the problem now is that it is stuck on loading for futbin prices and the trade bot cannot find player's price

2019-05-02T10:29:37.581Z [FUTBOT] error: Trade:SellAPlayer; couldnt sell because of error:Cannot read property 'prices' of undefined}

dogancana commented 5 years ago

Probably the api is changed since I didn't look into it. I'm not sure if I'd have time to check it, I can review PR's though

Denist79 commented 5 years ago

I am having this error.

C:\futbot\node_modules\ts-node\src\index.ts:261 return new TSError(diagnosticText, diagnosticCodes) ^ TSError: ? Unable to compile TypeScript: lib/trader/trade-utils.ts(34,35): error TS2493: Tuple type '[]' of length '0' ha s no element at index '0'. lib/trader/trade-utils.ts(42,24): error TS2532: Object is possibly 'undefined'. lib/trader/trade-utils.ts(42,31): error TS2493: Tuple type '[]' of length '0' ha s no element at index '0'.

at createTSError (C:\futbot\node_modules\ts-node\src\index.ts:261:12)
at getOutput (C:\futbot\node_modules\ts-node\src\index.ts:367:40)
at Object.compile (C:\futbot\node_modules\ts-node\src\index.ts:558:11)
at Module.m._compile (C:\futbot\node_modules\ts-node\src\index.ts:439:43)
at Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Object.require.extensions.(anonymous function) [as .ts] (C:\futbot\node_m

odules\ts-node\src\index.ts:442:12) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this comm and. [nodemon] app crashed - waiting for file changes before starting...

dogancana commented 5 years ago

This issue is kind of fixed by using a config file to change api endpoint. Refer to master