Jump to content

MobileSubstrate - My tweak Error arg1 arg2


Go to solution Solved by Crypto,

13 posts in this topic

Recommended Posts

Posted (edited)

Hello all. I tried to compile tweak like this http://pastebin.com/ZFP6g62e. but I found an error like this

 

Tweak.xm:4:185: error: expected class member or base class name

  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(bool) {
                                                               ^
Tweak.xm:4:184: error: only constructors take base initializers
  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(bool) {
                                                              ^
Tweak.xm:5:1: error: use of undeclared identifier 'arg2'; did you mean 'arg1'?
arg2 = TRUE;
^~~~
arg1
Tweak.xm:4:179: note: 'arg1' declared here
  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(bool) {
                                                         ^
Tweak.xm:5:6: error: assigning to 'id' from incompatible type 'int'
arg2 = TRUE;
     ^ ~~~~
Tweak.xm:12:8: error: expected expression
arg1 = ;
       ^
Tweak.xm:19:8: error: expected expression
arg1 = ;
       ^
Tweak.xm:25:172: error: expected class member or base class name
  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(id) {
                                                               ^
Tweak.xm:25:171: error: only constructors take base initializers
  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(id) {
                                                              ^
Tweak.xm:26:1: error: use of undeclared identifier 'arg2'; did you mean 'arg1'?
arg2 = ;
^~~~
arg1
Tweak.xm:25:166: note: 'arg1' declared here
  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(id) {
                                                         ^
Tweak.xm:26:8: error: expected expression
arg2 = ;
       ^
Tweak.xm:27:8: error: expected expression
arg1 = ;
       ^
Tweak.xm:47:1: error: non-void function
      '_logos_method$_ungrouped$BBMCoreAccess$adsEnabled' should return a value
      [-Wreturn-type]
return ;
^
Tweak.xm:53:1: error: non-void function
      '_logos_method$_ungrouped$BBMCoreAccess$getAllAds' should return a value
      [-Wreturn-type]
return ;
^
Tweak.xm:59:1: error: non-void function
      '_logos_method$_ungrouped$BBMEphemeralMetaData$remainingTime' should
      return a value [-Wreturn-type]
return ;
^
14 errors generated.
make[3]: *** [/users/pxcex/Desktop/Tweak/bbm/.theos/obj/debug/armv7/Tweak.xm.2995620b.o] Error 1
make[2]: *** [/users/pxcex/Desktop/Tweak/bbm/.theos/obj/debug/armv7/bbm.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [bbm.all.tweak.variables] Error 2

 

whether there is a solution. Thank you very much.

Updated by pxcex
Posted (edited)

Hello all. I tried to compile tweak like this http://pastebin.com/ZFP6g62e. but I found an error like this http://pastebin.com/J7u0Hp1Q. whether there is a solution. Thank you very much.

first error that I see :
 
-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool) {
arg2 = TRUE;

return %orig;

 

you're returning "arg2" but there's no "arg2" in your method. :wat:

 - Edit -

 

You used FlexConverter didn't you? Read the description next time :p It noticed users that it doesn't work with 2+ arguments. It also doesn't read (long long) and (double)

Updated by Crypto
Posted (edited)

 

first error that I see :
 
-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool) {
arg2 = TRUE;

return %orig;

 

you're returning "arg2" but there's no "arg2" in your method. :wat:

 - Edit -

 

You used FlexConverter didn't you? Read the description next time :p It noticed users that it doesn't work with 2+ arguments. It also doesn't read (long long) and (double)

 

 

Thanks. all problems had been solved, now I discovered this.

 

Tweak.xm:4:185: error: expected class member or base class name

  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(bool) {
                                                               ^
Tweak.xm:4:184: error: only constructors take base initializers
  ...BBMCoreAccess* _LOGOS_SELF_CONST self, SEL _cmd, id arg1):(bool) {
                                                              ^
Updated by pxcex
Posted

Show me ur tweak xm the updated one

 

Tks. here :

 

#include <substrate.h>

 
%hook BBMCoreAccess
-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool) {
arg1 = FALSE;
return %orig;
}
%end
 
%hook BBMCoreAccessGroup
-(void) sendTypingNotificationForConversationURI:(id)arg1 {
arg1 = NULL;
return %orig;
}
%end
 
%hook BBMCoreAccess
-(void) markEphemeralMessageAsViewed:(id)arg1 {
arg1 = NULL;
return %orig;
}
%end
 
%hook BBMCoreAccess
-(void) markMessagesRead:(id)arg1 withConversationURI:(id)arg2 {
arg2 = NULL;
arg1 = NULL;
return %orig;
}
%end
 
%hook BBMCoreAccess
-(bool) isRateBBMEnabled {
return TRUE;
}
%end
 
%hook BBMCoreAccess
-(void) setRateBBMEnabled:(bool)arg1 {
arg1 = TRUE;
return %orig;
}
%end
 
%hook BBMCoreAccess
-(id) adsEnabled {
return NULL;
}
%end
 
%hook BBMCoreAccess
-(id) getAllAds {
return NULL;
}
%end
 
%hook BBMEphemeralMetaData
-(double) remainingTime {
return FALSE;
}
%end
 
%hook BBMPingLimitHelper
-(bool) isLimitReached {
return TRUE;
}
%end
 
%hook BBMSystemMessageCell
-(bool) isRead {
return TRUE;
}
%end
 
%hook BBMSystemMessageCell
-(void) setIsRead:(bool)arg1 {
arg1 = TRUE;
return %orig;
}
%end
 
%hook BBMMessage
-(bool) canBeMarkedRead {
return TRUE;
}
%end
 
%hook BBMMessageCell
+(bool) automaticallyNotifiesObserversOfMessage {
return TRUE;
}
%end
 
%hook BBMGenEphemeralMetaData
-(bool) isScreenshot {
return TRUE;
}
%end
Posted

 

first error that I see :
 
-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool) {
arg2 = TRUE;

return %orig;

 

you're returning "arg2" but there's no "arg2" in your method. :wat:

 - Edit -

 

You used FlexConverter didn't you? Read the description next time :p It noticed users that it doesn't work with 2+ arguments. It also doesn't read (long long) and (double)

 

 

if you can fix this?
 
%hook BBMCoreAccess
-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool) {
arg1 = FALSE;
return %orig;
}

 

%end
Posted (edited)

hook BBMCoreAccess

-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool)arg2 {

arg1 = NULL ;

arg2 = FALSE;

return %orig;

}

%end

Updated by NaeeM.Cool
  • Solution
Posted (edited)

 

if you can fix this?
 
%hook BBMCoreAccess
-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool) {
arg1 = FALSE;
return %orig;
}

 

%end

 

%hook BBMCoreAccess

-(void) sendTypingNotificationForConversationURI:(id)arg1 isTyping:(bool)arg2 {

arg1 = NULL;

arg2 = FALSE;

return %orig;
}
%end
Updated by Crypto

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