I need some help on creating an activity
Moderator: senjer
I need some help on creating an activity
I want to create an activity that Line C in Simvliet 2020 is the London Underground S7 trains and Overground trains in Line D. I have changed it in the file but the game doesn't show the activity that I have created. I think there is some problem in the code. Can somebody help me to have a look to see what's wrong in my code. It's my first time to create activity on my own, if there is some skills that I need to know please tell me .Many thanks indeed.
- Attachments
-
- Line C with LU S7.zip
- (2.19 KiB) Downloaded 169 times
Re: I need some help on creating an activity
I see you made the same XML error multiple times.
Example:
<train pack="London" file="LUS7.xml"/>
<cab id="0" enabled="true" ai="410"/>
<car id="0" scrollsign2="10"/>
<car id="6" scrollsign2="10"/>
</train>
Do you see it? No?
Let me explain;
First, you open a 'chapter' "train", with <train. Then, you tell the simulator which train to load; pack="London" file="LUS7.xml". And after that, you close of the 'chapter' with /.
Now, you continue with this:
<cab id="0" enabled="true" ai="410"/>
<car id="0" scrollsign2="10"/>
<car id="6" scrollsign2="10"/>
The simulator won't know what to do with that; you already closed of the loading of the train, so these lines won't apply to that train.
And then, you place another train-chapter-closure with </train>. The simulator doesn't understand this, as no train-chapter is open at the moment. So you are closing something that, according to the simulator, doesn't exist at this moment. That is an XML error, and therefore the activity won't show up in the menu.
So what to do.... Don't close off the "train" chapter in that first line.
Your code should become:
<train pack="London" file="LUS7.xml">
<cab id="0" enabled="true" ai="410"/>
<car id="0" scrollsign2="10"/>
<car id="6" scrollsign2="10"/>
</train>
So... <train opens up the chapter "train", and /> in the same line closes it. If you do not use the /, it will remain open into the next code lines, until you close it with </train>.
You made this mistake multiple times, so go through your code again to filter them out.
Hope this helps
Example:
<train pack="London" file="LUS7.xml"/>
<cab id="0" enabled="true" ai="410"/>
<car id="0" scrollsign2="10"/>
<car id="6" scrollsign2="10"/>
</train>
Do you see it? No?
Let me explain;
First, you open a 'chapter' "train", with <train. Then, you tell the simulator which train to load; pack="London" file="LUS7.xml". And after that, you close of the 'chapter' with /.
Now, you continue with this:
<cab id="0" enabled="true" ai="410"/>
<car id="0" scrollsign2="10"/>
<car id="6" scrollsign2="10"/>
The simulator won't know what to do with that; you already closed of the loading of the train, so these lines won't apply to that train.
And then, you place another train-chapter-closure with </train>. The simulator doesn't understand this, as no train-chapter is open at the moment. So you are closing something that, according to the simulator, doesn't exist at this moment. That is an XML error, and therefore the activity won't show up in the menu.
So what to do.... Don't close off the "train" chapter in that first line.
Your code should become:
<train pack="London" file="LUS7.xml">
<cab id="0" enabled="true" ai="410"/>
<car id="0" scrollsign2="10"/>
<car id="6" scrollsign2="10"/>
</train>
So... <train opens up the chapter "train", and /> in the same line closes it. If you do not use the /, it will remain open into the next code lines, until you close it with </train>.
You made this mistake multiple times, so go through your code again to filter them out.
Hope this helps
CEO of the Rijndam Electrical Transport company
-
- Posts: 346
- Joined: 01 Jan 2020, 21:48
Re: I need some help on creating an activity
I need also help
- Attachments
-
- AI_Mega.zip
- that's only the M1 of the Activity
- (3.76 KiB) Downloaded 166 times
Hi
- perfecttrains1000
- Posts: 496
- Joined: 30 Apr 2018, 17:50
Re: I need some help on creating an activity
Tell me whats wrong with it? Does it show up in simulator? Do trains not run?
- Likes London Underground
- Somehow relates anything to trains
- Somehow relates anything to trains
-
- Posts: 346
- Joined: 01 Jan 2020, 21:48
Re: I need some help on creating an activity
It doesn't show upperfecttrains1000 wrote: ↑01 May 2020, 12:44 Tell me whats wrong with it? Does it show up in simulator? Do trains not run?
Hi
Re: I need some help on creating an activity
Same type of problem; opening two 'chapters' "car", and not closing them:
<train pack="RET" file="5000-1982.xml" number="5001">
<car id="0" scrollsign1="0.0" scrollsign2="01">
<car id="1" scrollsign1="0.0" scrollsign2="01">
</train>
Should be:
<train pack="RET" file="5000-1982.xml" number="5001">
<car id="0" scrollsign1="0.0" scrollsign2="01"/>
<car id="1" scrollsign1="0.0" scrollsign2="01"/>
</train>
And... Rename the ACT-file, to not overwrite existing activities ("M1 day.act")
<train pack="RET" file="5000-1982.xml" number="5001">
<car id="0" scrollsign1="0.0" scrollsign2="01">
<car id="1" scrollsign1="0.0" scrollsign2="01">
</train>
Should be:
<train pack="RET" file="5000-1982.xml" number="5001">
<car id="0" scrollsign1="0.0" scrollsign2="01"/>
<car id="1" scrollsign1="0.0" scrollsign2="01"/>
</train>
And... Rename the ACT-file, to not overwrite existing activities ("M1 day.act")
CEO of the Rijndam Electrical Transport company
- perfecttrains1000
- Posts: 496
- Joined: 30 Apr 2018, 17:50
Re: I need some help on creating an activity
that feeling when you get beat in activity help.
- Likes London Underground
- Somehow relates anything to trains
- Somehow relates anything to trains
Re: I need some help on creating an activity
Okey, I'll leave the next "activity doesn't work" up to you
CEO of the Rijndam Electrical Transport company
Re: I need some help on creating an activity
To be honest, 80% of the "my activity doesn't work" issues reported here can be resolved by copying your act file into https://www.freeformatter.com/xml-validator-xsd.html and seeing whats wrong.
-
- Posts: 346
- Joined: 01 Jan 2020, 21:48
Re: I need some help on creating an activity
That’s just the beginning of the activity
I first try one line And see if it works, then I make the second one
And when all works I put everything into a new activity
Then I can use it next time and don’t spam into the forumMichiel wrote: ↑01 May 2020, 13:00 To be honest, 80% of the "my activity doesn't work" issues reported here can be resolved by copying your act file into https://www.freeformatter.com/xml-validator-xsd.html and seeing whats wrong.
Thx
Hi