12-05-2015, 01:19 AM
(12-05-2015, 12:29 AM)ThatTrueStruggle Wrote: I wrote a BMS script to extract the files. Use it with QuickBMSStrange, I did everything correct but I got a error stating "Error: invalid command"xmath" or arguments -1 at line 7" I will see what the problem is but I bet I will fail to find it
Code:endian big //seems like idstrings are little endian but other values are big endian
idstring "0CSG"
get fileSize long
idstring "LBTN"
savepos RelativePos
get fileLengthPos long
xmath fileLengthPos "RelativePos + fileLengthPos"
get fileStart long
savepos RelativePos
xmath fileStart "RelativePos + fileStart"
savepos fileTableStart
i = 0
do
savepos fileTableStart
get fileNames[i] string
xmath i "i + 1"
while fileTableStart != fileStart
x = i
i = 0
for i = 0 < x
goto fileStart
get magicID long
get fileSize long
savepos RelativePos
log fileNames[i] fileStart fileSize
xmath fileStart "fileSize + fileStart"
next i
script's note:
This is a pretty crappy script, it does a lot to achieve so little lol