Jump to content

16 posts in this topic

Recommended Posts

Posted (edited)

hmm ,well, when i compile it , it says "you fell off the face of earth '{' 

Did you %end the function?

 

Or maybe you are missing stuff in your other functions.

Updated by Chrizk0
Posted (edited)

Did you %end the function?

 

Or maybe you are missing stuff in your other functions.

The missing '{' like I said. Maybe he copied the code before you edited it.

 

@Vegito Alternatively you can use

if (myObj.boolJail) {
// This will execute if boolJail is set to True
}

[The -(id) > return %orig, Just a pass-through.Wont delete the argument. Am i correct?

What? Updated by castix
Posted

Did you %end the function?

 
 
 
%hook SSJailbreakCheck
+ (id)runningProcesses 
{
if(GetPrefBool(@"kJail")) {
 
return [NSNumber numberWithInt:0];   
}
return %orig;
}
 
 
 
 
 
+ (int)filesExistCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
+ (int)symbolicLinkCheck
 {
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
 
+ (int)systemCheck
 {
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
+ (int)fstabCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
+ (int)processesCheck
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
+ (int)plistCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
+ (int)inaccessibleFilesCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
+ (int)cydiaCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
+ (int)urlCheck 
{
return 0;
}
return %orig;
}
 
 
 
 
 
+ (int)jailbroken 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
%end
 
 
 
you mean i should use %end everytime i use if(GetPrefBool(@"kXyz")?

The missing '{' like I said. Maybe he copied the code before you edited it.

 

@Vegito Alternatively you can use

if (myObj.boolJail) {
// This will execute if boolJail is set to True
}
What?

 

No, i compiled the tweak without any preference loader in a noob way, it started to show me errors as soon as i started with preference loader

Posted

 

 
 
 
%hook SSJailbreakCheck
+ (id)runningProcesses 
{
if(GetPrefBool(@"kJail")) {
 
return [NSNumber numberWithInt:0];   
}
return %orig;
}
 
 
 
 
 
+ (int)filesExistCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
+ (int)symbolicLinkCheck
 {
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
 
+ (int)systemCheck
 {
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
+ (int)fstabCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
 
+ (int)processesCheck
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
+ (int)plistCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
+ (int)inaccessibleFilesCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
 
 
+ (int)cydiaCheck 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
 
+ (int)urlCheck 
{
return 0;
}
return %orig;
}
 
 
 
 
 
+ (int)jailbroken 
{
if(GetPrefBool(@"kJail")) {
 
return 0;
}
return %orig;
}
%end
 
 
 
you mean i should use %end everytime i use if(GetPrefBool(@"kXyz")?

 

Yes now make a PSSwitchCell with the (kJail) key, that one switch will contain all those functions. 

Posted
...

 

You forgot to open the code block for every method for example

+ (int)filesExistCheck {
    if(myObj.boolJail) {
    return 0;
    }
    %orig;
}
Posted

i didn't copy any code from anywhere, i have made my tweak.xm backup on pc, i am simply copying it and pasting it here 


 

You forgot to open the code block for every method for example

+ (int)filesExistCheck {
    if(myObj.boolJail) {
    return 0;
    }
    %orig;
}

damn man :o thanks! let me try! 


 

You forgot to open the code block for every method for example

+ (int)filesExistCheck {
    if(myObj.boolJail) {
    return 0;
    }
    %orig;
}

i have given opening and closing parenthesis properly. It's not the opening of code block i guess.

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