News:

SimuTranslator
Make Simutrans speak your language.

Re: pak64 build a station using scripts

Started by koa_jp, March 12, 2023, 06:11:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

koa_jp

What's GCG1TrainStop & GCG2TrainStop in default pak64 pakset?
when I'm making simutrans script with using the follow code building station,
GCG1TrainStop & GCG2TrainStop is included in return value list.

building_desc_x.get_available_stations(building_desc_x.station, wt_rail, good_desc_x.passenger)
But GCG1TrainStop & GCG2TrainStop is not exist in railway tool.
and simutrans crashed with the follow code.

command_x.build_station(our_player, tile, "GCG2TrainStop")

Andarix

#1
Quote from: koa_jp on March 12, 2023, 06:11:53 AM...
building_desc_x.get_available_stations(building_desc_x.station, wt_rail, good_desc_x.passenger)...

local station_list = building_desc_x.get_available_stations(building_desc_x.station, wt_rail, good_desc_x("Passagiere"))

good_desc_x("Passagiere")

You must use the object name from the good file.

command_x.build_station(pl, tile, building_desc_x("GCG2TrainStop"))

Dwachs

#2
good_desc_x.passenger and good_desc_x.mail are fine, see http://dwachs.github.io/simutrans-sqapi-doc/classgood__desc__x.html

Edit: Crash should be fixed in r10885. Thanks for reporting!
Parsley, sage, rosemary, and maggikraut.