How to display values of variables (stack)

Das Forum befindet sich im reduzierten Betrieb. Die Addon- und Supportforen bleiben weiterhin verfügbar.
Bitte beachte, dass OMSI nicht mehr weiterentwickelt wird. Ein Teil der Entwickler widmet sich inzwischen der Entwicklung eines neuen Simulators. Weitere Informationen zum LOTUS-Simulator findest Du hier.
Ein communitybetriebenes Nachfolge-Forum wird hier verlinkt, sobald es gegründet und bereit ist.
  • Hi,


    I have to ask a very simple question here. How can you display values of variables (for debugging) in Omsi2?


    I have been trying to do something like this:
    (L.$.vuorokilpi_tex) $msg


    But i don't see anything.


    The macro language instructions tell this:
    $msg Writing the top string stack value into the debug line of OMSI. Wether it is a AI vehicle, a user vehicle or a sceneryobject.


    But what the heck is "debug line of OMSI"? I cannot see or make visible any debug line.
    I saw somewhere that CTRL+Y would display the debug line, but doesn't work for me.


    By the way, does the %stackdump% work in Omsi2? Is it used only by adding that command as a separate line in a script?


    -Welbus

  • Hi,


    the debug line is that red line at the top of the screen which displays all kinds of information (date, time, busstop, weather, ...). The keyboard shortcut is Ctrl+Z by default but you can change this in the settings menu.
    I think %stackdump% works only in debug mode ("OMSI.exe -debug"), this may also be the case for the $msg command.
    Personally, I've never used either one of them. To get information about a variable, I simply press Ctrl+S ingame and open the laststn.osn of the loaded map with a text editor. You can find all variables and their respective values in there.
    You can also use sound triggers to put any content in the logfile and review it later, here's an example:

    Code
    1. 123 456 + s0
    2. "Result: " l0 $IntToStr $+ (T.F.ev_IBIS_Ansagen)


    The entry in the logfile will look something like this:

    Code
    1. 3472 22:56:08 - - Warning: Soundfile vehicles\MAN_NL_NG_263\sound\Result: 579 does not exist!


    Not pretty, but it does the trick.

    ;)