DK22Pac / plugin-sdk

An SDK for developing ASI/CLEO plugins for GTA San Andreas, GTA Vice City and GTA III
zlib License
436 stars 118 forks source link

A lot of errors tryIng to compile and even opening file generated by Generate MyPlugin.bat #201

Open Alkimical opened 3 months ago

Alkimical commented 3 months ago

When i just open the .sln generated by Generate MyPlugin.bat and click on the cpp i get all this errors in VC. I followed the instructions and runned plugin.sln in Release and Debug modes.

Severity Code Description Project File Line Suppression State Details Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E0077 this declaration has no storage class or type specifier test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E0077 this declaration has no storage class or type specifier test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E0077 this declaration has no storage class or type specifier test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0260 explicit type is missing ('int' assumed) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0020 identifier "concept" is undefined test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 203
Error (active) E0277 invalid friend declaration test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 217
Error (active) E0135 namespace "std" has no member "optional" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 217
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 217
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error (active) E0135 namespace "std" has no member "optional" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E0260 explicit type is missing ('int' assumed) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E0260 explicit type is missing ('int' assumed) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E0260 explicit type is missing ('int' assumed) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E0077 this declaration has no storage class or type specifier test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 507
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 507
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 507
Error (active) E0077 this declaration has no storage class or type specifier test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 509
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 509
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 509
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E0260 explicit type is missing ('int' assumed) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E0260 explicit type is missing ('int' assumed) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E0260 explicit type is missing ('int' assumed) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E0289 no instance of constructor "safetyhook::InlineHook::InlineHook" matches the argument list test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 706
Error (active) E0077 this declaration has no storage class or type specifier test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 711
Error (active) E0135 namespace "std" has no member "expected" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 711
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 711
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0147 declaration is incompatible with "safetyhook::InlineHook safetyhook::create_inline(void target, void destination)" (declared at line 890) test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0441 argument list for variable template "safetyhook::FnPtr" is missing test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0018 expected a ')' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0291 no default constructor exists for class "safetyhook::InlineHook" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E1835 attribute "nodiscard" does not apply here test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0289 no instance of constructor "safetyhook::MidHook::MidHook" matches the argument list test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0018 expected a ')' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0291 no default constructor exists for class "safetyhook::MidHook" test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0065 expected a ';' test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0757 variable "safetyhook::FnPtr" is not a type name test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924
Error (active) E0084 invalid combination of type specifiers test C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924

When i try to build this code i get this in output:

Build started at 1:20 AM... 1>------ Build started: Project: RestoreHealthGTASA, Configuration: Release Win32 ------ 1>Main.cpp 1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\expected(11): warning STL4038: The contents of are available only with C++23 or later. 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(135,24): error C2039: 'expected': is not a member of 'std' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(135,32): error C2143: syntax error: missing ';' before '<' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(135,24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(135,6): warning C4869: 'nodiscard' may only be applied to classes, enumerations, and functions 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(135,73): error C2238: unexpected token(s) preceding ';' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(142,24): error C2039: 'expected': is not a member of 'std' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(142,32): error C2143: syntax error: missing ';' before '<' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(142,24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(142,6): warning C4869: 'nodiscard' may only be applied to classes, enumerations, and functions 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(143,104): error C2238: unexpected token(s) preceding ';' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(170,24): error C2039: 'expected': is not a member of 'std' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(170,32): error C2143: syntax error: missing ';' before '<' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(170,24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(170,6): warning C4869: 'nodiscard' may only be applied to classes, enumerations, and functions 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(171,104): error C2238: unexpected token(s) preceding ';' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(175,31): error C2039: 'expected': is not a member of 'std' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(175,39): error C2143: syntax error: missing ';' before '<' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(175,31): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(175,6): warning C4869: 'nodiscard' may only be applied to classes, enumerations, and functions 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(176,90): error C2238: unexpected token(s) preceding ';' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(203,9): error C2061: syntax error: identifier 'FnPtr' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(203,31): error C2143: syntax error: missing ';' before '{' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(203,31): error C2447: '{': missing function header (old-style formal list?) 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(227,20): error C2039: 'optional': is not a member of 'std' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(227,28): error C2988: unrecognizable template declaration/definition 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(227,28): error C2143: syntax error: missing ';' before '<' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(227,28): error C2059: syntax error: '<' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(600,37): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(890,26): error C2955: 'safetyhook::InlineHook': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(896,40): error C2065: 'FnPtr': undeclared identifier 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(896,46): error C2062: type 'auto' unexpected 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(896,83): error C2143: syntax error: missing ';' before '{' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(896,83): error C3837: attributes are not allowed in this context 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(896,83): error C2447: '{': missing function header (old-style formal list?) 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(904,58): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(904,23): error C2955: 'safetyhook::MidHook': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(910,34): error C2065: 'FnPtr': undeclared identifier 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(910,40): error C2062: type 'auto' unexpected 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(910,76): error C2143: syntax error: missing ';' before '{' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(910,76): error C3837: attributes are not allowed in this context 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(910,76): error C2447: '{': missing function header (old-style formal list?) 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(917,23): error C2955: 'safetyhook::VmtHook': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(924,41): error C2955: 'safetyhook::VmtHook': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(924,60): error C2061: syntax error: identifier 'FnPtr' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(924,22): error C2955: 'safetyhook::VmHook': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(924,22): error C2027: use of undefined type 'safetyhook::VmHook' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(924,22): error C2079: 'safetyhook::create_vm' uses undefined class 'safetyhook::VmHook' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(925,21): error C2027: use of undefined type 'safetyhook::VmtHook' 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(925,44): error C2065: 'destination': undeclared identifier 1>C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp(926,21): error C2672: 'std::move': no matching overloaded function found 1>C:\Users\Justin Steve\source\repos\plugin-sdk\injector\assembly.hpp(17,40): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\numbers(11): warning STL4038: The contents of are available only with C++20 or later. 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(125,80): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(125,73): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(125,67): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(127,33): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(127,26): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(127,20): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(129,40): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(129,33): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(129,30): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h(131,38): error C2955: 'safetyhook::Context32': use of class template requires template argument list 1>Done building project "RestoreHealthGTASA.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Build completed at 1:20 AM and took 02.478 seconds ==========

And this in errors:

Severity Code Description Project File Line Suppression State Details Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 125
Error C2065 'destination': undeclared identifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 925
Error C2039 'expected': is not a member of 'std' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error C2039 'expected': is not a member of 'std' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error C2039 'expected': is not a member of 'std' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error C2039 'expected': is not a member of 'std' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error C2065 'FnPtr': undeclared identifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error C2065 'FnPtr': undeclared identifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Warning C4869 'nodiscard' may only be applied to classes, enumerations, and functions RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Warning C4869 'nodiscard' may only be applied to classes, enumerations, and functions RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Warning C4869 'nodiscard' may only be applied to classes, enumerations, and functions RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Warning C4869 'nodiscard' may only be applied to classes, enumerations, and functions RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error C2039 'optional': is not a member of 'std' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 600
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 904
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\injector\assembly.hpp 17
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 125
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 125
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 127
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 127
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 127
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 129
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 129
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 129
Error C2955 'safetyhook::Context32': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\shared\Patch.h 131
Error C2079 'safetyhook::create_vm' uses undefined class 'safetyhook::VmHook' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924
Error C2955 'safetyhook::InlineHook': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 890
Error C2955 'safetyhook::MidHook': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 904
Error C2955 'safetyhook::VmHook': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924
Error C2955 'safetyhook::VmtHook': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 917
Error C2955 'safetyhook::VmtHook': use of class template requires template argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924
Error C2672 'std::move': no matching overloaded function found RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 926
Error C2447 '{': missing function header (old-style formal list?) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 203
Error C2447 '{': missing function header (old-style formal list?) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error C2447 '{': missing function header (old-style formal list?) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0441 argument list for variable template "safetyhook::FnPtr" is missing RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E1835 attribute "nodiscard" does not apply here RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error C3837 attributes are not allowed in this context RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error C3837 attributes are not allowed in this context RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0147 declaration is incompatible with "safetyhook::InlineHook safetyhook::create_inline(void target, void destination)" (declared at line 890) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0018 expected a ')' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0018 expected a ')' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 217
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 507
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 509
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 711
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0065 expected a ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0260 explicit type is missing ('int' assumed) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0260 explicit type is missing ('int' assumed) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E0260 explicit type is missing ('int' assumed) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E0260 explicit type is missing ('int' assumed) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E0260 explicit type is missing ('int' assumed) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E0260 explicit type is missing ('int' assumed) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E0260 explicit type is missing ('int' assumed) RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E0020 identifier "concept" is undefined RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 203
Error (active) E0084 invalid combination of type specifiers RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924
Error (active) E0277 invalid friend declaration RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 217
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 305
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 313
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 332
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 507
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 509
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 640
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 648
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 668
Error (active) E0135 namespace "std" has no member "expected" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 711
Error (active) E0135 namespace "std" has no member "optional" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 217
Error (active) E0135 namespace "std" has no member "optional" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error (active) E0291 no default constructor exists for class "safetyhook::InlineHook" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error (active) E0291 no default constructor exists for class "safetyhook::MidHook" RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error (active) E0289 no instance of constructor "safetyhook::InlineHook::InlineHook" matches the argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 706
Error (active) E0289 no instance of constructor "safetyhook::MidHook::MidHook" matches the argument list RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error C2059 syntax error: '<' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error C2061 syntax error: identifier 'FnPtr' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 203
Error C2061 syntax error: identifier 'FnPtr' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924
Error C2143 syntax error: missing ';' before '<' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error C2143 syntax error: missing ';' before '<' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error C2143 syntax error: missing ';' before '<' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error C2143 syntax error: missing ';' before '<' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 175
Error C2143 syntax error: missing ';' before '<' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error C2143 syntax error: missing ';' before '{' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 203
Error C2143 syntax error: missing ';' before '{' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error C2143 syntax error: missing ';' before '{' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Warning STL4038 The contents of are available only with C++23 or later. RestoreHealthGTASA C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\expected 11
Warning STL4038 The contents of are available only with C++20 or later. RestoreHealthGTASA C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\numbers 11
Error (active) E0077 this declaration has no storage class or type specifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error (active) E0077 this declaration has no storage class or type specifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 142
Error (active) E0077 this declaration has no storage class or type specifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 170
Error (active) E0077 this declaration has no storage class or type specifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 507
Error (active) E0077 this declaration has no storage class or type specifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 509
Error (active) E0077 this declaration has no storage class or type specifier RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 711
Error C2062 type 'auto' unexpected RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 896
Error C2062 type 'auto' unexpected RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 910
Error C2238 unexpected token(s) preceding ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 135
Error C2238 unexpected token(s) preceding ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 143
Error C2238 unexpected token(s) preceding ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 171
Error C2238 unexpected token(s) preceding ';' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 176
Error C2988 unrecognizable template declaration/definition RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 227
Error C2027 use of undefined type 'safetyhook::VmHook' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924
Error C2027 use of undefined type 'safetyhook::VmtHook' RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 925
Error (active) E0757 variable "safetyhook::FnPtr" is not a type name RestoreHealthGTASA C:\Users\Justin Steve\source\repos\plugin-sdk\safetyhook\safetyhook.hpp 924

nathan130200 commented 2 weeks ago

Goto project settings and set to C++ lang version to preview. The "generaye myplugin.bat" is generating with old C++ version in vcproj file.

The "missing" types/header files are present only in preview/latest c++ versions. (std::excepted type is C++ 23)

image

This screenshot is from plugin.sln but this fix is the same for ASI plugin projects. Set C++ version to preview.

nathan130200 commented 2 weeks ago

Better solution, just comment line 36 on project.lua then generate project again (because C++ latest is already defined in line 25):

https://github.com/DK22Pac/plugin-sdk/blob/12487f6be7846946802497d7471f8c58473b3cd6/tools/myplugin-gen/premake/project.lua#L25-L38