Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by ademes

  1. Hi Timba and Metallix, Thank you both to come back on this matter. I will try to be more explicit. In many train manager that I know (CDM Rail, Train Controller,...) , the entire layout is cut into segments (Bahn Kanton??) residing between 2 switches, one switch and a signal, 2 signals. In addition,a bumper also determines the limit of a segment, including a reverse option. These segments are linked together in order to build an itinerary. If the link between two segments is a switch or a lot of switches (called a grill in English), than the position of each of these switches
  2. The one here that need to review his position on this forum is not me, Goetz… It's you and if you don't want to be botherred, let other responsible answer. What I said gently was : you are making a mistake with your previous answer : it may not work because a group is NOT a track and so the event "train enter/leave a track" will never be triggered with your solution. That is the point. Next, if you check the event where the group is used, MBS however indicates "train enters a track", just because of the keyword. Remove the keyword and you will discover that the only event that may
  3. Hi Goetz, Sorry you are right! I forgot to give you a feedback! The list is well sorted as you explained Oh yeah! great! and it is ok; I may enter keyword and variables. BUT, snif, snif… it don't work as the group with the keyword doesn't trigger the event Watch the layout where I tested it. Look at group L1 with keyword station Regards André Test grill 1.mbp
  4. Hi Andy Where is such Lua function coming from? Is there a place somewhere to have a list of all these functions? Thank you André
  5. Hello, I have a question / suggestion : When one double clic on a track, all the tracks between 2 switches are selected. Great! But the result is "multiple selection" on which one can only Apply some properties. My question/suggestion : as these lot of tracks correspond to a section (or block or segment or any name one can give), is it not possible to : give an objet's name to the selection in order to use it the same way as other objects give the possibility to assign object's variables to that new object. Thank you André
  6. Hello, I try the Following in an even : 1. define the table : rails table {0 items} 2. run : table.insert($("test").variables["rails"], track.name) 3. result : the table "rails" is well filled with all track's names, but the order is Strange - see attached 1 4. define in a script the table : liste = {} define a table : liste2 table {0 items} 5. run : table.insert(liste, track.name) $("test").variables["liste2"] = liste 6. result : the table liste2 is well filled with all track's names, but now the order is cor
  7. Thank you metallix. I upgrade now to new version André
  8. Hello, I'm still in version and I wasn't informed of an upgrade to including the new features I'm waiting for. I mean that when opening my actual version, I don't have the Opportunity to upgrade. Should I do something else? Thank you André
  9. Ok! Thank you martin51. This solves also my previous post. Regards André
  10. Hello, In addition to my previous message, it seems that the function "return" doesn't run properly Under MBS. The Following should return a value for n : function foo(n) print ("function foo") return n*2 end foo(4) print ("N = ", n) should return N = 8, but it returns nothing (N = ) Regards André
  11. Hello, I have a problem with "Function" : I call a function with the Following arguments : setgrill (grill, listgrill, train, return_code) where "grill" and "setgrill" are tables, Train is the object "vehicle" and return_code is a variable number set to 0 when Calling the function. Inside the function, return_code will be set to 0 if OK and to 4 if KO. But when I test the value of return_code after the call to the function, its value is always 0 even if the function set it to 4. I've inserted the instruction "return return_code" at the end of the function, but it seems that the
  12. OK! Great and this is a good reason. André
  13. Thank you Goetz. I will wait. Is using external files (Lua files) another alternative? And, if yes, is it recommended and what are the rules to apply? Regards André
  14. Hi goetz, Thank you for your help and it works fine now... except that the table "liste", even if correctly filled by the event, appears empty if I open the script where it is defined. I suppose that this is because the table is dynamic, howver its content is available in another event. So my question now is : how to keep the content of the table "liste" when I save and close the layout. My objective is trying to build (more or less automatically) a table containing the itinerary of a specific train. Could you help me? regards André
  15. Hi Goetz, Thank you but however, the code you suggested didn't work as one can see in the attached tracing; in addition, the table "liste" remains empty and the vehicle doesn't stop. What's wrong??
  16. Hello, Do the following Lua's functions run : Table.insert, table.remove, table.getn? I've tried to insert the name of the current track into a table, but it doesn't work. Why? See attached test layout. Thank you in advance André Test table.mbp
  17. Thank you BahnLand, I didn't know (see) this option. André
  18. Hello, It seems that there is a bug when trying to implement multiple conditions linked by "And" or "Or". It seems impossible to have : condition 1 and condition 2 or condition 3 When I try to change the second "And" to "Or", both "And" becomes "Or" and vice-versus. Regards André
  19. Hi BahnLand, hi Goetz Thank you for your explanation and thank you also to Goetz for his help in Lua. Here is my testing layout and I would appreciate to get your feedback on it. This is based on itinerary, predefined as shown in the table (excel) in the center of the ground; each train receives an itinerary to follow that gives the position of the different switches necessary to follow the foreseen way. These itinerary are mentionned on the top of the 5 engines. The objective is to have such a table for all switches in a layout permitting to a train to follow its itinerary safe
  20. Hi BahnLand Thank you for your answer. This means that I have to deeply review my layout, but I will try to apply your solutions. Notice that Goetz already suggest to avoid timers and replace them by defer execution, but my difficulty was to restart the event triggering the check because this event was originally triggered by "train enters a track". And when the train is stopped, the trigger will never restart automatically. Regards André
  21. Hello, I’ve a problem with the event « timer expires ». I have a station with six platforms; the trains enter and leave that station left and right. This means that one have 6 exit tracks at both side = 12 exits to manage. Each train is predetermined by its itinerary to reach one specific station’s track. Just consider the problem when an engine leaves the station. In order to reach the next section (block), a certain number of switches must be free to permit their reservation and positioning. If it is not the case, the train must wait. And when the waiting time is
  22. Thank you Goetz. André
  23. the question is : does the delay trigger the event in whitch it is initiated once again? In other words, does the event restart automatically after the delay? Thank you André
  24. hello, I have a question concerning the "delay command"
  25. Hi Goetz, Sorry to disturb you André
  • Create New...