• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Progress

Messages
12
Country
unitedstates
Thiis is a follow up update of my last post coding tutorials?

This post is to tell those who were on my last post how I am doing. I will put () at some to indicate I have problems an hopefully you can help me figure it out. This is C#

What I have learnt:

-Strings
-Int
-Arrays
-Methods
-Class
-Switch Statement
- If Statement
- Else if Statement( I Dont Fully understand so could somebody give example)
- Namespaces
- Objects
- Operators

Well this is what I learnt so Far, This is what they call The Fundamentals so can somebody give me an example of a else if statement after you write an If statement Keep getting This Error Can't really tell you since I'm not on my computer. Also Please tell Me if this is good Progress for 3 Days or should I speed Up.

Thanks,
Pilot122x
Soon to Be Coder
 
Last edited:
1 If OnAB = 1 then
2 do this code
3 ElseIf OffAB = 1 then
4 do that code
5 Else
6 do something weird
7 End If

The initial IF on line 1 is a test for TRUE. In an If...Then...End If structure if the test is TRUE the code between the If...Then...End If is processed. An If...Then...Else...End If includes the Else to process code when the If test is not True or FALSE. The ElseIf brings in another test for TRUE that is processed before the Else. If it test to True then the code between the ElseIf and Else gets processed. If neither the If or the ElseIf are True, the code after the Else would be processed.

So above, if I was (my terms here) "On the Airport Background" something would be done. If I was "Off the Airport Background" something different would be processed. Which would seem to cover either case, right? If so, all I would need to code is an If...Then...Else...End If. But I have a third condition, OnWater. So I test the three possibilities, first, am I OnAB? If not, am I OffAB? If not, then I must be OnWater.

Spaghetti code offered at no charge!:D
 
Back
Top