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.

QuickBMS "wrong command-line argument"

Featured Replies

  • Author
  • Localization

jonaskohl, posted Mon Aug 13, 2018 6:22 pm (37481)


Hi there!

I use the following batch file to mass extract game files:

Code:
@echo off

rem Set directories. Can be changed.
set bfbb_gameroot=""
set bfbb_export=""

rem --- Script start ---

rem Prompt user for map directory and map file name
set /p bfbb_mapdir="Enter map directory (e.g. bb):"
set /p bfbb_mapid="Enter map id (e.g. BB01):"

set bfbb_extract="%bfbb_export%\%bfbb_mapdir%"

rem Create output directory
md "%bfbb_extract%"

rem Extract files
quickbms "%cd%\SpongeBobBBBPS2hop.bms" "%bfbb_gameroot%\%bfbb_mapdir%\%bfbb_mapid%.HOP" "%bfbb_extract%"

rem Copy and rename texture files
md "%bfbb_extract%\tex"
copy "%bfbb_extract%\*.RWTX" "%bfbb_extract%\tex\*.txd"

echo Done! Press any key to exit
pause>nul
exit /b


But I get this output from QuickBMS:

Code:
QuickBMS generic files extractor and reimporter 0.9.0
by Luigi Auriemma
e-mail: [email protected]
web:    aluigi.org
        (Jun 17 2018 - 11:49:55)

                   quickbms.aluigi.org  Homepage
                            zenhax.com  ZenHAX Forum
                     @zenhax @quickbms  Twitter & Scripts


Error: wrong command-line argument (\SpongeBobBBBPS2hop.bms)


What am I doing wrong?
  • Author
  • Localization

aluigi, posted Tue Aug 14, 2018 12:57 pm (37498)


Spaces in the bfbb_* directories that enable the usage of the quote.
Replace quickbms with echo and you will get what I mean, the double quote:
"c:\\SpongeBobBBBPS2hop.bms" ""c:\xxx xxx"\bb\bb01.HOP" """c:\xxx 2"\bb""

This stuff is ever a pain, take a look here:
https://ss64.com/nt/syntax-args.html
https://ss64.com/nt/syntax-esc.html

you can also use the -v option after quickbms for debugging the interpretation of the command-line without echo, long story short it's rare but in some particular occasions there is a difference in how the arguments are handled by C/C programs and, for example, .NET. It's not this case but it's just something interesting to know :D
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.