News: Portal
Our Simutrans site. You can find everything about Simutrans from here.

command_x causes Simutrans to crash.

Started by Yona-TYT, March 28, 2020, 12:03:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


When using script text tag with "command_x" to build a road section, simutrans stops working and the terminal shows this: "sim: boden/wege/ static weg_t* weg_t::alloc(waytype_t): Assertion `0' failed."
This is not present in older reviews, so I am assuming something has broken recently.


Can you post the script text that triggers the error? Is this related to building of powerlines?
Parsley, sage, rosemary, and maggikraut.




Click on the link "go to next step", this will execute the following code block:

file "class/class_chapter_02.nut" line 1234
switch (this.step) {
            case 1:
                delay_mark_tile(coordb, coordb,0, true)
                //Para la carretera
                local t1 = command_x(tool_remover)
                local err1 =, square_x(coordb.x, coordb.y).get_ground_tile(), "")
                local t2 = command_x(tool_build_way)           
                local err2 =, square_x( coorda.x, coorda.y ).get_ground_tile(), square_x(coordb.x, coordb.y).get_ground_tile(),"Road_070")
                return null


Will check.

Please use command_x::build_way for this purpose:

It has more parameter checks than command_x::work
Parsley, sage, rosemary, and maggikraut.


Parsley, sage, rosemary, and maggikraut.