| Author |
Message |
   
Ricardo Cunha (Ricardocunha)
| | Posted on Thursday, Jun 9, 2005 - 16:45: | |
In the following template I have an error message using it. The error message is: "Parameter error Line 42: SzReg2"Reg2" endsection }" It refers to the "hex variable" statement on the second array. When I use this template with a constant value (for example: "hex 10") It works. The "hex variable" statement also works using just one array. Would anyone help me? Thanks in advance, Ricardo PS: If necessary I can send an example file. -------------- template "Format X" description "Description Format X" fixed_start 0 applies_to file begin uint16 "Var1" big-endian uint16 "Var2" byte "Var3" byte "Var4" char[6] "Var5" char[6] "Var6" char[8] "Var7" char[32] "Var8" byte "Var9" byte "Var10" byte "Var11" byte "Var12" big-endian uint16 "Var11" big-endian uint16 "Var12" big-endian uint16 "Var13" big-endian uint16 "Var14" big-endian uint16 "SzArray1" big-endian uint16 "SzArray2" numbering 0 { section "Array1 #~" move 2 big-endian uint16 "SzReg1" move -4 hex SzReg1 "Reg1" endsection } [SzArray1] numbering 0 { section "Array2 #~" move 2 big-endian uint16 "SzReg2" move -4 hex SzReg2 "Reg2" endsection } [SzArray2] end |
   
Stefan Fleischmann (Admin)
| | Posted on Thursday, Jun 9, 2005 - 17:00: | |
There is a limit to the dynamic size of a hex variable, approx. 5,400 bytes. Maybe SzReg2 is larger than that. |
   
Ricardo Cunha (Ricardocunha)
| | Posted on Friday, Jun 10, 2005 - 14:17: | |
Hy Stefan In fact the SzReg2 is small (SzReg2 < 50). This problem happens when I use "Apply" button as a compile error, even after I have used "Check syntax" button without problems. Maybe you will need my file to do your tests. How can I send it to you? Thanks for your reply! I hope you can help me! Ricardo |
   
Stefan Fleischmann (Admin)
| | Posted on Friday, Jun 10, 2005 - 14:20: | |
If not too large (< 5 MB), please send it to this e-mail address. |
   
Ricardo Cunha (Ricardocunha)
| | Posted on Monday, Jun 13, 2005 - 20:49: | |
Stefan Did you receive my file? I sent it last friday (6/10) to admin@winhex.net. Thanks, Ricardo |
   
Stefan Fleischmann (Admin)
| | Posted on Monday, Jun 13, 2005 - 21:18: | |
Yes, I have received it, thanks. Will let you know when I have found out what is wrong. |
   
Stefan Fleischmann (Admin)
| | Posted on Tuesday, Jun 21, 2005 - 12:58: | |
The error is the one I pointed you to before. In your sample file, at offset 0x154, when you interpret FE F8 as an unsigned big-endian integer "SzReg2", that value is 65,272 = too large. |