Rail3D Modifications Detailed Listing

Back to Rail3D Bugs List
Identifier: 79
Category: Bug
Bug severity: Not working as designed Status: Accepted
Reported date: 15/07/2011 (Build 105) Date fixed:
Keywords: script Expected build:
Mode: Build with fix:
Application: Scripts Implementer:
Brief description: SetTrainMax() not correct Comments:
Detailed description:

When a locomotive (eg route 0M27) couples to stock with the following script, the resultant train is not set to its maximum speed. However, if the locomotive has its route set to 4M prior to coupling, the setting is made correctly. OnCouple() { string sClass; string s1Class; sClass=Train.GetRoute(); s1Class=Left(sClass,1); if(s1Class=="4") { Train.SetTrainMax(50/2.24); } }