Sign in to follow this  
Guest jimkeir

Problems with an LWM file exported from LWM viewer to Source code

Recommended Posts

Hello,I've got a big problem.What I tried to do was that I exported the file HP949130.bgl (Eurw) into Source code using LWM Viewer to make some changes in there. But the code I get then can't get compiled with BGLC.exe.I haven't done any changes and I get hundreds of error messages like this one:LWMPoly3(12): Macro Called FromSource_LWM000.bgs(1041): Included FileSource_LWM000.bgs(1041): fatal error A1012: missing operator in expressionI am really confused. Is there anyone who know how to solve that problem? The LWM Viewer version I use is 1.4.Sascha

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi.I don't know of any reason that file would fail to decompile. V1.4 was beta (that is, experimental) but I the export functions should have been OK.The best thing to do would be to look at the very first errors that appear. One error at the start can cause lots further on. Also, take a look at the source that it's compiling. Those numbers (1041 for example) are line numbers in the bgs file. If you can post one of these lines, with a few lines either side for context, it would help.Cheers,Jim Keir

Share this post


Link to post
Share on other sites

Hi Jim,Thanks for the reply. Here are the first lines of the error message:------------------------------------------------Microsoft ® Flight Simulator BGL Compiler Version 8.00Copyright © Microsoft Corp 1981-2002. All rights reserved. Assembling: HP949130.azmHP949130.asm(32) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(32): Include FileHP949130.asm(39) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(39): Include FileHP949130.asm(50) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(50): Include FileHP949130.asm(57) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(57): Include FileHP949130.asm(68) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(68): Include FileHP949130.asm(75) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(75): Include FileHP949130.asm(86) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(86): Include FileHP949130.asm(93) : warning A4006: too many arguments in macro call LWMPoly3(1): Macro Called From HP949130.asm(93): Include File....................------------------------------------------------It stops at 1049!And here are the first lines of the code exported:------------------------------------------------; Created by LWMViewer at 12/16/04 11:34:00; Original filename : C:FS2004SceneryEurwSceneryHP949130.bgl; Original boundary :; N 53.43753; S 50.62502; E 7.50000; W 3.75000;; Please note that only LWMs and VTPs are disassembled. Any other; information in the original file is not here.include TDFMacros.incinclude TDFHeaders.inc_Water_ EQU 0_Land_ EQU 1_Flatten_ EQU 2_Transparent_ EQU 3BGLHeader 53,49,8,3, LWMHeader, TerrainHeaderStartLWMHeader label word LWMFileHeader 768, LWMIndexStart, LWMStart, LWMEndLWMStart label word; Start of cell 393 x 104 dataCELLSTART_000000 label wordCellID_000000 EQU LWMCellID 0, 0, _Transparent_, 393, 104 LWMDataAreaDrawPolygons 1,_Transparent_,1,24,22; N53* 11.20', E4* 35.09' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaDrawPolygons 1,_Transparent_,1,25,22; N53* 11.20', E4* 35.97' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaFill1x1 0, _Water_, 1, 24, 23 LWMDataAreaHeight -4, 0 LWMDataAreaFill1x1 0, _Water_, 1, 25, 23 LWMDataAreaHeight -4, 0 LWMDataAreaDrawPolygons 1,_Transparent_,1,26,22; N53* 11.20', E4* 36.85' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaDrawPolygons 1,_Transparent_,1,27,22; N53* 11.20', E4* 37.73' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaFill1x1 0, _Water_, 1, 26, 23 LWMDataAreaHeight -4, 0 LWMDataAreaFill1x1 0, _Water_, 1, 27, 23 LWMDataAreaHeight -4, 0 LWMDataAreaDrawPolygons 1,_Transparent_,1,28,22; N53* 11.20', E4* 38.61' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaDrawPolygons 1,_Transparent_,1,29,22; N53* 11.20', E4* 39.49' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaFill1x1 0, _Water_, 1, 28, 23 LWMDataAreaHeight -4, 0 LWMDataAreaFill1x1 0, _Water_, 1, 29, 23 LWMDataAreaHeight -4, 0 LWMDataAreaDrawPolygons 1,_Transparent_,1,30,22; N53* 11.20', E4* 40.37' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaDrawPolygons 1,_Transparent_,1,31,22; N53* 11.20', E4* 41.25' LWMPoly3 4, 0, _Water_, -4, 0, -4, 0 LWMPoint3 255, 211, 0 LWMPoint3 255, 255, 0 LWMPoint3 1, 255, 0 LWMPoint3 1, 211, 0 LWMDataAreaFill1x1 0, _Water_, 1, 30, 23 LWMDataAreaHeight -4, 0 LWMDataAreaFill1x1 0, _Water_, 1, 31, 23 LWMDataAreaHeight -4, 0 LWMDataAreaFill8x8 0, _Water_, 0, 1, 3, 0, 3 LWMDataAreaHeight -4, 0CELLEND_000000 label word; End of cell 393 x 104 data; Start of cell 394 x 104 dataCELLSTART_000001 label word...............------------------------------------------------Well, I don't see a anything bad there - but I've never worked with LWM code, just VTP2.Sascha

Share this post


Link to post
Share on other sites

Hi.Looks to me like the exported code is wrong. The LWMPoint3 shouldn't be on the end of the LWMPoly3 instruction, it should be on its own line. I'd suggest going back to LWMViewer 1.3 (still on the website) and trying that instead.I've done *lots* of work on LWMViewer since that 1.4b version came out. At the moment it doesn't have any export code at all, because so much of the program has been re-written. I probably can't get the new version out in too much of a hurry, there are still way too many things that don't work. 1.3 is probably your best bet.Cheers,Jim

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this