Francesco149/oppai

syntax error when counting PP with SD or PF

Closed this issue · 6 comments

C:\Users\QHS>"C:\CoolQ Pro\data\image\resource\oppai.exe" "C:\CoolQ Pro\data\image\resource\osu\1059390.osu" -ojson +sd 97.12% 0m 228x

+SD
{"oppai_version":"1.1.18","code":-2,"errstr":"syntax error"}

C:\Users\QHS>"C:\CoolQ Pro\data\image\resource\oppai.exe" "C:\CoolQ Pro\data\image\resource\osu\1059390.osu" -ojson 97.12% 0m 228x
{"oppai_version":"1.1.18","code":200,"errstr":"no error","artist":"Drop","title":"Granat","creator":"Left","version":"Insane","mods_str":"","mods":0,"od":7.5,"ar":9,"cs":4.3,"hp":6,"combo":228,"max_combo":229,"num_circles":61,"num_sliders":78,"num_spinners":0,"misses":0,"score_version":1,"stars":4.0024787806542204,"speed_stars":1.8782654451297689,"aim_stars":2.0422307053928908,"nsingles":117,"nsingles_threshold":138,"aim_pp":30.755210021571642,"speed_pp":23.756500317173852,"acc_pp":5.5947907430272652,"pp":61.919390076092263}

Is it a feature or a bug..?

it might be that it considers all unused mods as syntax error, will check

also uhh you opened the issue in the wrong repo. please reopen in oppai-ng, lol

and yeah it just syntax error's if there's not recognized mods, guess i can just remove that https://github.com/Francesco149/oppai-ng/blob/master/main.c#L1021

i suggest you can just add SD and PF, and calculate as none
qq 20170911203653
my solution in my app is.... remove SD and PF if they exists, and submit the mods list to oppai

yeah it's an easy fix, will let you know when i fix it, probably tonight

but yeah you can also just

mods &= ~(SD | PF)

to clear SD and PF bits before converting mods into the mods string to pass to oppai

fixed in Francesco149/oppai-ng@7430c25

no binary release yet, but you can compile it from source