OpenFunscripter - a scripting tool - 3.2.0 release

the double colon is not legal enum syntax. Based on the error message I think there’s nothing wrong with this file, but the last included file is broken.

Could you take a look at rapidcsv.h (included on line 4), and check if there perhaps is something wrong with the include guards. Or try updating to a newer version of that file.

Thanks for that.
I downloaded a new copy of rapidcsv.h from the Github project page, there was a minor version difference to thought that would be the easiest way to go. To be on the safe side I deleted the whole project, pulled the whole OFS again from Git, replaced that header file, did a new cmake (which ran 100% clean), did a make, failed in the same place with the same thing. Here’s the full output of the error:

[ 82%] Building CXX object localization/CMakeFiles/gen_localization.dir/gen_localization.cpp.o
/home/phil/Downloads/OFS/localization/gen_localization.cpp:10:13: error: found ‘:’ in nested-name-specifier, expected ‘::’
   10 | enum ColIdx : uint32_t
      |             ^
      |             ::
/home/phil/Downloads/OFS/localization/gen_localization.cpp:10:6: error: ‘ColIdx’ has not been declared
   10 | enum ColIdx : uint32_t
      |      ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp:11:1: error: expected unqualified-id before ‘{’ token
   11 | {
      | ^
/home/phil/Downloads/OFS/localization/gen_localization.cpp: In function ‘void write_src_file(FILE*, rapidcsv::Document&)’:
/home/phil/Downloads/OFS/localization/gen_localization.cpp:62:16: error: ‘ColIdx’ has not been declared
   62 |     fwrite(row[ColIdx::Default].data(), 1, row[ColIdx::Default].size(), src);
      |                ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp:62:48: error: ‘ColIdx’ has not been declared
   62 |     fwrite(row[ColIdx::Default].data(), 1, row[ColIdx::Default].size(), src);
      |                                                ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp:69:20: error: ‘ColIdx’ has not been declared
   69 |         fwrite(row[ColIdx::Default].data(), 1, row[ColIdx::Default].size(), src);
      |                    ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp:69:52: error: ‘ColIdx’ has not been declared
   69 |         fwrite(row[ColIdx::Default].data(), 1, row[ColIdx::Default].size(), src);
      |                                                    ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp: In function ‘void write_header_enum(FILE*, rapidcsv::Document&)’:
/home/phil/Downloads/OFS/localization/gen_localization.cpp:100:16: error: ‘ColIdx’ has not been declared
  100 |     fwrite(row[ColIdx::Key].data(), 1, row[ColIdx::Key].size(), header);
      |                ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp:100:44: error: ‘ColIdx’ has not been declared
  100 |     fwrite(row[ColIdx::Key].data(), 1, row[ColIdx::Key].size(), header);
      |                                            ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp:106:20: error: ‘ColIdx’ has not been declared
  106 |         fwrite(row[ColIdx::Key].data(), 1, row[ColIdx::Key].size(), header);
      |                    ^~~~~~
/home/phil/Downloads/OFS/localization/gen_localization.cpp:106:48: error: ‘ColIdx’ has not been declared
  106 |         fwrite(row[ColIdx::Key].data(), 1, row[ColIdx::Key].size(), header);
      |                                                ^~~~~~
make[2]: *** [localization/CMakeFiles/gen_localization.dir/build.make:76: localization/CMakeFiles/gen_localization.dir/gen_localization.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1286: localization/CMakeFiles/gen_localization.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Please let me know if there’s anything else you think I could try - it would be great to get this working.

I did some more digging and apparently GCC only recently implemented support for this particular enum declaration (GCC issue here). I don’t understand this because cppreference claims this feature was standardized in C++11 (standard from 2011).

If I’m reading that right, the fix is to replace:

enum ColIdx : uint32_t

by:

enum ColIdx

Alternatively, try compiling with clang, it may give better error messages.

1 Like

Nice one. Removing that did correct that issue.

The make gets a little further then bombs out again - there’s a ton of errors but this is the start of it (all the errors seem to be very similar in nature):

[ 85%] Building CXX object OFS-lib/CMakeFiles/OFS_lib.dir/Funscript/FunscriptAction.cpp.o
In file included from /home/phil/Downloads/OFS/lib/bitsery/include/bitsery/details/serialization_common.h:29,
                 from /home/phil/Downloads/OFS/lib/bitsery/include/bitsery/serializer.h:27,
                 from /home/phil/Downloads/OFS/lib/bitsery/include/bitsery/bitsery.h:40,
                 from /home/phil/Downloads/OFS/OFS-lib/OFS_BinarySerialization.h:2,
                 from /home/phil/Downloads/OFS/OFS-lib/Funscript/FunscriptAction.h:3,
                 from /home/phil/Downloads/OFS/OFS-lib/Funscript/FunscriptAction.cpp:1:
/home/phil/Downloads/OFS/lib/bitsery/include/bitsery/details/adapter_common.h: In function ‘void bitsery::details::readSize(Reader&, size_t&, size_t, TCheckMaxSize)’:
/home/phil/Downloads/OFS/lib/bitsery/include/bitsery/details/adapter_common.h:54:13: error: ‘uint8_t’ was not declared in this scope
   54 |             uint8_t hb{};
      |             ^~~~~~~
/home/phil/Downloads/OFS/lib/bitsery/include/bitsery/details/adapter_common.h:36:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   35 | #include "../common.h"
  +++ |+#include <cstdint>
   36 | 
/home/phil/Downloads/OFS/lib/bitsery/include/bitsery/details/adapter_common.h:55:37: error: ‘hb’ was not declared in this scope
   55 |             r.template readBytes<1>(hb);
      |                                     ^~
/home/phil/Downloads/OFS/lib/bitsery/include/bitsery/details/adapter_common.h:59:24: error: expected ‘;’ before ‘lb’
   59 |                 uint8_t lb{};

Not sure if jamming this thread up like this is a good idea so I might just open an issue on the bugtracker.

1 Like

I think it’s fairly obvious what the issue is in this case:

note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?

:slight_smile:

Hi, I’m the guy who made the issue about AVX2 on github The way I figured this out was to run OFS in the visual studio debugger. Your CPU doesn’t support AVX2, so you definitely need to use an older mpv.dll. I grabbed mine from an older OFS release.

2 Likes

Ok so I need to add the include to /lib/bitsery/include/bitsery/details/adapter_common.h ?

Why not just install/compile the AppImage dependencies in Gentoo and use the provided AppImage from GitHub release page?

I don’t like pre-compiled software.

Anyway, after doing the include, the build works…!!!

Thanks for the help, @lsidfoaprgsmdvlnvas !

1 Like

Does anyone know if there’s a way to have OFS highlight segments that are below a certain speed threshold (but not flat), similar how it can highlight segments that are above a threshold? I’m trying to improve some scripts by finding places where the script is slower than the Handy’s minimum speed, since it can result in some weird behavior.

This is great. The reason I gave up trying to script was because JFS was too laggy to work, and while OFS was smooth to work with, I couldn’t for the life of me get a joystick to integrate with it properly. Do you have any information about how to get that working in this version? Is there support for it or a way to do it in scripting? I’d be more than happy to program a script for it if someone could point me to the appropriate API functions to take joystick input.

I would say this would be a nice feature to have.


And on that, i would have liked it if there were actualy 2 upper tresholds you can configure. A hard limit and a soft limit. The hard limit would be a treshold that if you go above it, you can be sure the handy wont be playing it correctly. And a soft limit as a more of target treshold (as beyond 400 the color doesnt change, so there is no indication you exceeded it, yet you in plenty of cases want to exceed it).

Note that even if the handy cant exceed 400, the OSR can, making a script compatible with both is better. And this means OSR values are prefered as long as they dont exceed the absolute handy limit. Anything beyond 600 is going to be highly unreliable (can cause skipped strokes, and when going above it for extended durations can even cause desync errors).

Currently i only have set strokes above 600 to be displayed purple as that means a long purple section is problematic, and a very balanced purple/red mixture is at its absolute limit (and not played accurately, but can be desired if its more about intensity instead of accuracy - helpful for CH videos).

hi i cant find the 3d simulator according to the video it should be beneath the regular simulator in the view options menu but it isnt there. (i’m using version 3.2.0)

Im also missing the 3D Simulator.
Edit:
nevermind, found out it got removed and replaced with

1 Like

After upgrading from windows 7 to windows 10, I copied out the mpv.dll from the OFS 2, installed OFS 3.2, renamed mpv-2.dll to mpv-2.dll.old, copied in the old mpv.dll and renamed it to mpv-2.dll, and it works without crashing.

… now if I can just get it to import a funscript made by another tool (scriptplayer.videosync.exe).

1 Like

Whenever I try to open OFS I click “run as admin,” I get the usual pop-up asking me if I want this app to be able to make changes to my computer, I click yes, and then nothing happens. I used OFS a couple of years ago on a different computer, and I don’t think I ever had this problem. I’m running the latest version and my Windows 10 PC is better than the laptop I was running it on previously. I’ve also made exceptions with antivirus for OFS and even tried turning it off completely. Any ideas?

And if you don’t run it as admin? Does the same happen?

Same thing happens… nothing. I don’t get an error message, and it doesn’t even start to open then crash. Just nothing happens.

Weird. Only thing that I can think of is a fresh install. Make sure to delete everything from OFS. There is a folder in appdata as well.

I just realized that my computer needs to do an update. I’m going to let it finish doing that, try again, then do a fresh install if that doesn’t work.

Let me know if it works after that.

1 Like