Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Compatibility Issue v0.12.0 - Findloc string variable not working anymore

Featured Replies

  • Author
  • Localization

zgoro, posted Fri Dec 09, 2022 9:06 pm (74526)


Hi guys,

Been having an issue when running my scripts that were working perfectly fine with version v.0.11.0, but stopped working in v.0.12.0.

Basically Findloc command is not reading the string variable anymore:


Code:
Math A = 1
Open FDSE "prova.txt" 100             # an external .txt file with strings:  _1_ , _2_ ...

goto 0x0 100

String VAR P "_%A%_"                  # String to search as VAR
findloc OFFSET string VAR 100 ""      # VAR is not read in v.0.12.0
print "VAR found at %OFFSET|x%"

test.7z

  • Author
  • Localization

spiritovod, posted Fri Dec 09, 2022 11:46 pm (74529)


@zgoro: I suppose that's how quickbms print works now in latest version (it's adding \n to the end of output, like actual print command). Anyway, it's better to use usual printf like this: [string VAR p "_%d_" A] to avoid possible issues.
  • Author
  • Localization

zgoro, posted Sat Dec 10, 2022 9:32 am (74533)


Still not passed as variable, I'll report this into quickBMS errors topic.
@mods, please feel free to delete this topic, thanks!
  • Author
  • Localization

spiritovod, posted Sat Dec 10, 2022 5:22 pm (74541)


@zgoro: Suggested solution works fine here with latest stable 0.12 version, otherwise I would not recommend it.
Code:
VAR found at 0x0000000000000017

Make sure you are using it correctly, as p and P are different operators and also %d is different from d or d and should be adjusted accordingly in case of changes in txt pattern, etc.
  • Author
  • Localization

zgoro, posted Sun Dec 11, 2022 10:58 am (74554)


Code:
Math A = 1
Open FDSE "prova.txt" 100             # an external .txt file with strings:  _1_ , _2_ ...

goto 0x0 100

string VAR p "_%d_" A                 # String to search
print "%VAR%"

findloc OFFSET string VAR 100 "" 0      # VAR is not read
print "VAR found at %OFFSET|x%"


Not passing it using QuickBMS 0.12.0:
Quote:
_1_
VAR found at
  • Author
  • Localization

spiritovod, posted Mon Dec 12, 2022 10:44 am (74571)


@zgoro: This is expected, because 0 at the end of findloc means you're limiting offset range to 0-0 here (unless you'll do goto to the end of file and search backwards). If you'll remove that 0 from findloc, it will work properly (and you don't have it in the original version of the script).
  • Author
  • Localization

zgoro, posted Mon Dec 12, 2022 6:57 pm (74579)


Thanks it did work!

Unfortunately this change does affect a large number of scripts made, so I'll definitely stick with the older version for the moment.
Guest
This topic is now closed to further replies.

Account

Navigation

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.