Jump to content

1 post in this topic

Recommended Posts

Posted (edited)

When compiling my package I'm greeted with this error:

Tweak.xm:224:1: error: inline variables are a C++17 extension [-Werror,-Wc++17-extensions]
inline int GetPrefInt(@"test")

Tweak.xm:224:12: error: cannot initialize a variable of type 'int' with an rvalue of type 'NSString *'
inline int GetPrefInt(@"test")
           ^          ~~~~~~~
Tweak.xm:224:31: error: expected ';' after top level declarator
inline int GetPrefInt(@"test")

 

My Tweak.xm

inline int GetPrefInt(@"test")
{
return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] intValue];
}

%hook AHookedfun
-(long long) someLong {
return GetPrefInt(@"speed");
}
%end 

 

Updated by Astronaut

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines