The Forum is up for sale: XeNTaX Forum looking for new owner

QuickBMS Script Problem

Coders and would-be coders alike, this is the place to talk about programming.
Post Reply
jawharp
advanced
Posts: 45
Joined: Wed Sep 23, 2009 5:16 pm
Been thanked: 3 times

QuickBMS Script Problem

Post by jawharp »

Hey,

So I'm having a little trouble here. I can't seem to figure out why this isn't working right. I'm trying to multiply the value in the variable "DIRS" by 16 and have the script goto the offset of DIRS*16. It is absolutely not working. Any ideas?

Code: Select all

Endian Big;
Get HEADERSIZE Short;
Get UNK1 Long;
IDString "MECC";
Goto 0x56;
Get DIRS Short;
Get FILES Long;
Math DIRS *= 16;
Goto DIRS;
For i = 0 < FILES;
Getdstring TYPE 0x08;
Get NAME Long;
String TYPE += NAME;
Get OFFSET Long;
Get FILESIZE Long;
log TYPE FILESIZE OFFSET;
next i; 
Thanks,
:twisted: jawharp :twisted:
User avatar
Dinoguy1000
Site Admin
Posts: 786
Joined: Mon Sep 13, 2004 1:55 am
Has thanked: 154 times
Been thanked: 163 times

Re: QuickBMS Script Problem

Post by Dinoguy1000 »

Could it be that DIRS is getting overflowed because it's a short (two bytes, unless I'm mistaken)? Keep in mind I don't know that much about using MexScript, let alone QuickBMS, so I could be wrong/completely off-base. =/
Welcome to Xentax!

Rules | Requests | Wiki | Discord

If you run across a post that breaks the rules, please report the post - a mod or admin will handle it from there.
jawharp
advanced
Posts: 45
Joined: Wed Sep 23, 2009 5:16 pm
Been thanked: 3 times

Re: QuickBMS Script Problem

Post by jawharp »

This was my fault. It was multiplying correctly. I just had the wrong address it was supposed to go to...

there's an hour of my life I can't get back.

:eek:
:twisted: jawharp :twisted:
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: QuickBMS Script Problem

Post by aluigi »

after you waste an hour for a simple problem there are good chances that the same will not happen in future... yeah a sort of investment :)
Post Reply