PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

Make sure properties have a correct value

Open jabbink opened this issue 10 years ago • 25 comments

Description: Now the default values of properties are defined twice, once in Settings.kt and once in Main.kt. Make sure that it's only defined once and (then automatically) fix incorrect default values like the IV threshold of 400 (fixed already) and this CHARMENDER (vs CHARMANDER) in https://github.com/jabbink/PokemonGoBot/blob/develop/src/main/kotlin/ink/abb/pogo/scraper/Main.kt#L68

jabbink avatar Jul 24 '16 22:07 jabbink

Isn't that defined in the config. Looked around, not sure what I'm missing.

Lenovotro avatar Jul 24 '16 22:07 Lenovotro

transfer_cp_threshold, doesn't seem to work set to 1000 & still displays 400

neox387 avatar Jul 24 '16 22:07 neox387

@neox387 sigh...

Thanks for noticing. As you can see in the top comment (click that link) that setting is indeed ignored.

jabbink avatar Jul 24 '16 22:07 jabbink

Is this why neither of the branches nor the latest release not work?

Forty-Tw0 avatar Jul 24 '16 22:07 Forty-Tw0

No. All branches work. Stop hating on Spring Boot.

jabbink avatar Jul 24 '16 22:07 jabbink

It is giving me a hard time! I can't run anything. I am building on linux.

Forty-Tw0 avatar Jul 24 '16 22:07 Forty-Tw0

Try

git reset --hard
git checkout master
git pull
cd lib/PokeGOAPI-Java
git reset --hard
cd ../..
git submodule update --init --recursive
./gradlew clean build

jabbink avatar Jul 24 '16 22:07 jabbink

Still getting #247

Forty-Tw0 avatar Jul 24 '16 22:07 Forty-Tw0

That's a different error.

jabbink avatar Jul 24 '16 22:07 jabbink

obligatoryTransfer is the same case. If i set it to blank, i got this error of incorrect enum value I think you can't leave it blank as of now?

kennethinsnow avatar Jul 24 '16 22:07 kennethinsnow

No. All branches work. Stop hating on Spring Boot.

Can we at least hate on the DEBUG output and banner?? :)

joligario avatar Jul 24 '16 22:07 joligario

Can we at least hate on the DEBUG output and banner?? :)

DEBUG output, yes #249; The banner: Never :joy:

jabbink avatar Jul 24 '16 22:07 jabbink

It was in fact bad settings, my token was expired/bad. It is working for me now. Take care though, it transferred some of my pokemon, seemed to ignore keep_pokemon_amount=2. Also transfer_cp_threshold defaults to 400 even though I have it set to -1, so that is probably why they were deleted.

Forty-Tw0 avatar Jul 24 '16 23:07 Forty-Tw0

I found the issue / an issue btw... It assumes that both "ignore_pokemon" and "obligatory_transfer" have values. If you remove those values it should transfers all (for ignore_pokemon) and have no "always transfer" pokemon.

Try having "ignore_pokemon=" for example and it'll break.

oddslol avatar Jul 24 '16 23:07 oddslol

keepPokemonAmount transferCPThreshold sortByIV are set to defaults even though I have them changed in my config.properties. I see the default JSON data is set in Settings.kt, and there are missing lines in Main.kt that are supposed to overwrite them! XD

Forty-Tw0 avatar Jul 24 '16 23:07 Forty-Tw0

Thnx Oddslol that was the issue :+1:

Offline-R503B avatar Jul 24 '16 23:07 Offline-R503B

I still have the fatal error on bot start. Can you pack a new zipped version without any issues please?

Evuse avatar Jul 24 '16 23:07 Evuse

It is a settings issue, I am fixing missing lines in Main.kt. Not sure what to do about invalid settings though. Unless there are other plans for settings fixes?

Forty-Tw0 avatar Jul 24 '16 23:07 Forty-Tw0

My settings are exactly the same as 0.3 and 0.4. I have not changed anything.

  • Downloaded ZIP
  • Downloaded JAR
  • Edited config.properties with my latitude, longitude, username and password
  • Run the bot: java -jar pogo.scraper-all-0.4.1.jar

On 0.3 and 0.4 works like charm... but not for 0.4.1

Can you please make the same zip+JAR for 0.4.1?

Thanks indeed!

Evuse avatar Jul 24 '16 23:07 Evuse

Oh I see how it works now, #223 moved settings configuration into bot-settings/config-properties-conversion.json and Main.kt also sets vals to override the JSON but is missing some lines. "ignoredPokemon" : [ "MISSINGNO" ], "obligatoryTransfer" : [ "MISSINGNO" ], in the JSON must not be null or it fails with that huge wall of text.

Forty-Tw0 avatar Jul 24 '16 23:07 Forty-Tw0