Need help with an XML code that doesn't work.

FSSC, Airport 2.*, CfgEdit, etc. Get to grips with designing Scenery & Panels here!

Need help with an XML code that doesn't work.

Postby DeepSpace » Mon Mar 13, 2006 9:35 am

Hi. I'd appreciate it if someone would be able to tell me why the following XML code doesn't work... Thanks in advanced.


 This gauge controls vapor trails when taking off and landing in a humid air.
 

 .
 
 
 

Last edited by DeepSpace on Mon Mar 13, 2006 9:37 am, edited 1 time in total.
DeepSpace
1st Lieutenant
1st Lieutenant
 
Posts: 428
Joined: Sat Jun 08, 2002 11:55 am
Location: Israel

Re: Need help with an XML code that doesn't work.

Postby microlight » Mon Mar 13, 2006 2:30 pm

I have very similar logic in a gauge that I wrote that does something very similar, but it works off the smokesystem rather than the cabin lights. This turns the smokesystem on if three targets are met:

(A:RADIO HEIGHT,feet) 100 > if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:INDICATED ALTITUDE,feet) 9000 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:KOHLSMAN SETTING MB,millibars) 1014 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:TOTAL AIR TEMPERATURE,farenheit) 40 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) }


I have 'if' amd 'els' arguments, whereas yours have no 'els' arguments. Another difference is that my gauge uses A variables with numerical values as switches. I haven't had much luck either with boolean logic.

Let us know how you get on.

;)
User avatar
microlight
Major
Major
 
Posts: 2076
Joined: Mon Aug 19, 2002 6:24 pm
Location: Southern UK

Re: Need help with an XML code that doesn't work.

Postby DeepSpace » Mon Mar 13, 2006 2:42 pm

Thanks for the reply :)
I'm not sure I'm fully getting the logic behind your code.
Does it mean that if the radio height is more than 100 feet , the indicated alt. is less than 9000 feet and the weather conditions are as written the smoke system will kick in?
It looks like only one of these is needed inorder for the smoke system to work.

Also, would it work the same way if instead of (>K:SMOKE_ON) and (>K:SMOKE_OFF) I'll use (>K:TOGGLE_CABIN_LIGHTS)?

Thanks a lot for your help
Last edited by DeepSpace on Tue Mar 14, 2006 12:52 am, edited 1 time in total.
DeepSpace
1st Lieutenant
1st Lieutenant
 
Posts: 428
Joined: Sat Jun 08, 2002 11:55 am
Location: Israel

Re: Need help with an XML code that doesn't work.

Postby DeepSpace » Tue Mar 14, 2006 1:00 am

Also, could it be that the gauge is not loaded correctly into the panel?  I put this line in the panel.cfg file:

gaugexx=y!name_of_xml_file, 0,0,20,20

of course, "xx" is a number following the gauge before, and "y" is a name of a folder inside the gauge folder where the xml gauge is in.
DeepSpace
1st Lieutenant
1st Lieutenant
 
Posts: 428
Joined: Sat Jun 08, 2002 11:55 am
Location: Israel

Re: Need help with an XML code that doesn't work.

Postby microlight » Tue Mar 14, 2006 4:21 am

What it means is that there have to be a combination of circumstances before the smoke kicks in: that is, the height has to between 100 and 9000 feet, the temperature has to be less than 40F and the pressure has to be less than standard before the vortices show up.

;)
User avatar
microlight
Major
Major
 
Posts: 2076
Joined: Mon Aug 19, 2002 6:24 pm
Location: Southern UK

Re: Need help with an XML code that doesn't work.

Postby DeepSpace » Tue Mar 14, 2006 5:31 am

Got it, will give it a try. :)
DeepSpace
1st Lieutenant
1st Lieutenant
 
Posts: 428
Joined: Sat Jun 08, 2002 11:55 am
Location: Israel

Re: Need help with an XML code that doesn't work.

Postby DeepSpace » Tue Mar 14, 2006 5:44 am

I've gotta be doing something wrong, because it doesn't work for me  :( :'(
DeepSpace
1st Lieutenant
1st Lieutenant
 
Posts: 428
Joined: Sat Jun 08, 2002 11:55 am
Location: Israel


Return to Scenery & Panel Design

Who is online

Users browsing this forum: No registered users and 266 guests