Sign in to follow this  
Guest

FSDS Scenery

Recommended Posts

Hello All!I need to ask for some help here!Just got FSDS Pro up and running. I am trying to create a "broken" DC3 scenery API from the DC3 that was included as a sample in the FSDS program. It seems to compile ok in FSDS and I have been able to create a "broken" DC3 aircraft I can fly...looks real wierd...LOL!)but I get this message when I try to compile the Airport Scenery using the DC3 macro...Error in macro file C:Program FilesAirport for WindowsApiDC-3OH_ST.api line 5158 -> EndA -> destination ":" out of range (77418), source line 43Scasm compilation status: error(s) 1It doesnt halt the BGL generation, but when I open FS it locks up on the startup Screen!Any ideas?!Thanks,Scott Thomas

Share this post


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

This means the object is to complex for an API. This can be solved by making a few changes to the source code. If you can post the beginning of the code here, then I can indicate where.

Share this post


Link to post
Share on other sites

If You are making an API (or scenery BGL) from an airplane, then go to to file-properties menu and make sure to check if You have area C enabled. Also make sure You have latest revision of FSDS v2 installed (at least 2.11).Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Thanks for the reply!This is the BOX STOCK FSDS Pro...Not V2Just bought this on Clearance (Cheap guy!! LOL!) as all I wanted to do is some Scenery objects! V2 is another Pay update , right?Here is the begining of the API code...;VODDATA Latitude Longitude Range Scale Rotation Not_used Not_used Not_used Not_used Visibility Elevation Scenery_complexity(0-5) Not_used Not_used;MACRODESC FSDS object 29x21 using scale 0.020000;Generated with FS Design Studio;Copyright 2000 by Louis Sinclair; %1 = Latitude; %2 = Longitude; %3 = Range; %4 = Scale; %5 = Rotation; %6 = Not used; %7 = Not used; %8 = Not used; %9 = Not used; %10 = Visibility range; %11 = Not used; %12 = Scenery complexitymif( 0 ); displays airport symbolArea( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 1 %1 %2 )Points( 1-714 0 -529-714 0 529714 0 529714 0 -5290 0 0 )Poly( a 1 5 2 )Poly( a 2 5 3 )Poly( a 3 5 4 )Poly( a 4 5 1 )Return:endsymblEndAmifendArea( 5 %1 %2 %3 )IfVarRange( :Exit 0346 %12 5 )PerspectiveCall( :PCall )Again...THANKS!!Scott

Share this post


Link to post
Share on other sites

Should have mentioned it, I am interested in the piece that starts with the last Area command you posted here. The first part you posted now is "only" the airport symbol.

Share this post


Link to post
Share on other sites

LOL! This part?Area( 5 %1 %2 %3 )IfVarRange( :Exit 0346 %12 5 )PerspectiveCall( :PCall )ShadowCall( :PC02 )Jump( :Exit ):PCallPerspective:PC02mif( %11 )RefPoint( 2 :Skip %4 %1 %2 E= %11 v1= %10 V2= 2859 )melseRefPoint( 7 :Skip %4 %1 %2 v1= %10 v2= 2859 )mifendRotatedCall( :B 0 0 %5 )Return:BCall32( :Part0 )Call32( :Part1 )Call32( :Part2 )Call32( :Part3 )Call32( :Part4 )Call32( :Part5 )Call32( :Part6 )Call32( :Part7 )Call32( :Part8 )Call32( :Part9 )Call32( :Part10 )Call32( :Part11 )Call32( :Part12 )Call32( :Part13 )Call32( :Part14 )Call32( :Part15 )Call32( :Part16 )Call32( :Part17 )Call32( :Part18 )Call32( :Part19 )Call32( :Part20 )Call32( :Part21 )Call32( :Part22 )Call32( :Part23 )Call32( :Part24 )Call32( :Part25 )Call32( :Part26 ):SkipReturn:ExitJump( :End );; Part: Wing: left.1:Part0VecPoints( 0 Thanks!Scott

Share this post


Link to post
Share on other sites

Hi Scott!Put before these linesArea( 5 %1 %2 %3 )IfVarRange( :Exit 0346 %12 5 )PerspectiveCall( :PCall )these lines:Set( BUF 1024 )Set( areamx 1024 )Set( LINBUF 2048 )and please try again. I hope it will work. Also if this scenery is for FS2002, then You can replace Area( 5 ...) with Area( C ... ); the later type of area permits larger API's, let's say bigger then 130kB.Hope it helps!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

Okay, This is what I now have... FS Still crashes (BTW...yes, 2002); %7 = Not used; %8 = Not used; %9 = Not used; %10 = Visibility range; %11 = Not used; %12 = Scenery complexitymif( 0 ); displays airport symbolArea( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 1 %1 %2 )Points( 1-714 0 -529-714 0 529714 0 529714 0 -5290 0 0 )Poly( a 1 5 2 )Poly( a 2 5 3 )Poly( a 3 5 4 )Poly( a 4 5 1 )Return:endsymblEndAmifendSet( BUF 1024 )Set( areamx 1024 )Set( LINBUF 2048 )Area( 5 %1 %2 %3 )IfVarRange( :Exit 0346 %12 5 )PerspectiveCall( :PCall )ShadowCall( :PC02 )Jump( :Exit )On the Area "C" thing. I notice there are two places calling out area "5". Do both of these need changed to area "C"? and do I still need those three "set" lines?Thanks Again!Scott

Share this post


Link to post
Share on other sites

Hi,With a text editor do Find & Replace change this: Jump( to this: Jump32(Hope that helps, Luis

Share this post


Link to post
Share on other sites

Thanks for the reply!!The first one (the original that I made the changes from the forum here)compiled fine in airport! But it was angled wrong, so I corrected the angle in FSDS and made a new API (with a different name. I copied the added/changed lines from the one that works and I now get this error in airport!...Error in macro file C:Program FilesAirport for WindowsApiDC-3-OH1.api line 5233 -> EndA -> destination ":Skip" out of range (-39696), source line 2744Scasm compilation status: error(s) 1AAARRRGGGGHH!!LOL!Scott

Share this post


Link to post
Share on other sites

> -> destination ":Skip" out of range (-39696), source lineHi,Go to that source line 2744 and probably you will findJump( : Skip )Change toJump32( :Skip )Regards, Luis

Share this post


Link to post
Share on other sites

Hi Scott!First area is just as it is written in comment: just to display object in Airport for Windows and is not used in latter model. SCASM just ignores it.The second Area, just after the last Set() is important, so change only here from Area( 5 %1 %2 %3 ) to Area( C %1 %2 %3 )The next thing as Louissa advised, change all Jump() instructions to Jump32(), all Call() instructions to Call32().If still doesn't work, if You still see the error regardin long jump then You will probably also need some manual editing. I hope nowhere in code (parts below this header) are any IfVarRange( :Skip ... ) or IfVarAnd( :Skip ... ) because it will be a little bit hard to explain but laicly said You will need to reroute these jumps to label :Skip to another unique and case sensitive label after which immediately Return instruction follows.Well I hope it will work and You won't need to do such tedious job!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

Share this post


Link to post
Share on other sites

I really appreciate all your help here!This is line 2744...IfVarRange( :Skip 7a 0 187 )any help?Thanks!Scott

Share this post


Link to post
Share on other sites

>I really appreciate all your help here!>>This is line 2744...>>IfVarRange( :Skip 7a 0 187 )>>any help?>>Thanks!>>Scott>Bad news Scott,As Goram said you need to reroute jumps! I will try to explain!Change that IfVarRange( :Skip 7a 0 187 )to IfVarRange( :Skip_luissa 7a 0 187 )Then locate a Return afer that line 2744 and insert these 2 lines after the ReturnReturn <<<<< this one already exists:Skip_luissaJump32( : )If you have more of these may be you can change the IfVarAnd to point to this :Skip_luissa.Good Luck,Luis

Share this post


Link to post
Share on other sites

Luis,I think this won't work as You said. It will exit APi prematurely and possibly it will have effect on later apis. I am 99% sure that in FSDS label :Skip is just before Return so Scott, You will need to reroute it like this.Let's say You have a part like this:;Part0123IfVarRange( :Skip 7a 0 187 )Points ( 0 1 2 3 ;1 2 3 4 ;2)Poly( a 1 2 3 4 )ReturnYou must change part to something like this:;Part0123IfVarRange( :Ret0123 7a 0 187 ) <<< note changed labelPoints ( 0 1 2 3 ;1 2 3 4 ;2)Poly( a 1 2 3 4 ):Ret0123 <<< note added labelReturnThe problem is that aircraft macros are quite long so there will be hell of correcting! Scott, what is important here is that label in IfVarRange/IfVarAnd and label just before return in the part match; I again must warn You, they are case sensitive! Also, this label must be unique so best thing to do is to have it named like :Ret and number of part.So You need to search for every :Skip label in the part after header and change it like I wrote up there. Then it should work.Otherwise, I would suggest You to upgrade FSDS to V2.11 because the problem of long jumps have now been solved, code is FS2002+ friendly although the macros are longer than before.I hope we have now solved Your problem. If still not working, we'll help!Best regards,Goran BrumenFS Slovenija 2002 teamhttp://slovenia.avsim.net

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