News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Problems with "gui.open_info_win ()"

Started by Yona-TYT, April 30, 2017, 02:00:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yona-TYT

Using "gui.open_info_win ()" causes problems in some cases, this has happened for a long time.

Tests: tutorial-test5.zip

scenario.nut  (line 261)
function resume_game()
{
    point = persistent.point
    gcount = persistent.count
    gsignal = persistent.signal
    sigcoord = persistent.sigcoord
         // check for script version and compatibility, then use update
         if ( persistent.version < version )
              update()                // do update old versions
         load_chapter(persistent.chapter,0)      // load correct chapter for player=0
    chapter.step = persistent.step        // set chapter step from persistent
    chapter.step_ext = persistent.step_ext    // set chapter step from persistent


    select_option_halt = tile_x( 0, 0, select_option.z ).find_object(mo_label)
     
    //persistent.select = select_option_halt.get_name()
         //settings.set_industry_increase_every(0) // correct settings of savegame
            gui.open_info_win()            // show scenario window

}


Capture:

Yona-TYT


Using this in "get_result_text(pl)" improves things.  :P
        //Delay is 2 at start or advance of chapter
        if (delay>0){
            delay--
            return 0
        }