Skip to content
Guest Big Announcement

convert NSArray <NSString*> to long long

Featured Replies

Ollah,

 

I currently have this code:
 

//inside the initalizer
offsets:(NSArray <NSString *> *)offsets hexPatches:(NSArray <NSString *> *)hexPatches


// if switch is being toggled
for(int i = 0; i < offsets_.count; i++) {
    inject([offsets_[i] longLongValue], [hexPatches_[i] longLongValue]);
}

//switch code:
[menu addHackNamed:@"God Mode" description:@"You can't die" textColor: [UIColor whiteColor] offsets:@[@("0x100299DC0" "0x100299DC4")] hexPatches:@[@("0x20008052" "0xC0035FD6")]];

 

But whenever I toggle the menu, it freezes for a sec & then crashes.
I don't see any logs...

 

Is my code wrong? Is there a better approach?

Thankyou in advance

your approach seems fine to me, this is what i would do. Imo what could wrong is
 

  • [offsets_ longLongValue] idk if thats how string is converted to longlong

the inject code is being called before the values of offsets and hexpatches is declared

You might need to declare the size of the array (A problem in every language). Like you have declared an array here but no size, so it cant set it it seems?

Archived

This topic is now archived and is closed to further replies.

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.