Transport Fever 2

Transport Fever 2

AI Builder
Ferocious 19 Jul, 2022 @ 3:46am
Errors in buildTownBusStops, completeBusNetwork
Thank you for this awesome mod! I'd like to report some errors i get:

keep getting errors trying to connect town to town train passenger route, mod builds railways and starting road infrastructure such as road depots, bus stop but no connections to road network and no additional stops (however dunno if it designed to do so). Railroad connection seems fine except it builds additional depot that isn't connected to railroad and clips through station. Thank you anyway!

An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: attempt to index a nil value

stack traceback:
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function '__index'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: in function 'findCentralEdgeByLandUseType'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1264: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1251>
(...tail calls...)
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3242: in function 'buildTownBusStops'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3468: in function 'completeBusNetwork'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:381: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:378>
[C]: in function 'xpcall'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334>

An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: attempt to index a nil value

stack traceback:
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function '__index'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: in function 'findCentralEdgeByLandUseType'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1264: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1251>
(...tail calls...)
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3242: in function 'buildTownBusStops'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3468: in function 'completeBusNetwork'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:381: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:378>
[C]: in function 'xpcall'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334>

About to mark as completed, currentBuildParams= nil

About to mark as completed, currentBuildParams= nil

About to mark as completed, currentBuildParams= nil
Last edited by Ferocious; 19 Jul, 2022 @ 5:40am
< >
Showing 1-15 of 34 comments
Ferocious 19 Jul, 2022 @ 5:30am 
here's some more errors I encountered — this time it stucks after building initial stations and depot, builds no railways. The progress bar in AI builder menu increases but nothing happens:


Connecting towns Kyoto with Koto using rail
******************************************************************************
Setting the custom route scoring
Overriding stationLengthParam to 0
Overriding stationLength to 80
Overriding allowPassengerCargoTrackSharing to true
attempting to connect Kyoto with Koto
{
testDataCollision = {
collisionEntities = {
},
autoRemovalEntity2models = {
[75989] = {
[1] = 0,
},
[80899] = {
[1] = 0,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 0,
[6] = 0,
[7] = 0,
[8] = 0,
[9] = 0,
[10] = 0,
[11] = 0,
[12] = 0,
[13] = 0,
[14] = 0,
},
[144089] = {
[1] = 1,
},
},
fieldEntities = {
},
buildingEntities = {
},
},
testDataError = {
},
}
About to build command
About to sent command
attempt command result was true
begin connecting stations
getting depot node 157301 at k= 2
An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:2633: attempt to perform arithmetic on field 'ourZCorrection' (a nil value)
stack traceback:
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function '__add'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:2633: in function 'tryBuildRoute'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4129: in function 'buildRoute'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:10182: in function 'buildRouteBetweenStations'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:911: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:806>
[C]: in function 'xpcall'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334>
An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: attempt to index a nil value
stack traceback:
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function '__index'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: in function 'findCentralEdgeByLandUseType'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1264: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1251>
(...tail calls...)
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3242: in function 'buildTownBusStops'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3468: in function 'completeBusNetwork'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:381: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:378>
[C]: in function 'xpcall'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334>
An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: attempt to index a nil value
stack traceback:
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function '__index'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1229: in function 'findCentralEdgeByLandUseType'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1264: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1251>
(...tail calls...)
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3242: in function 'buildTownBusStops'
F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:3468: in function 'completeBusNetwork'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:381: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:378>
[C]: in function 'xpcall'
[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334>
Last edited by Ferocious; 19 Jul, 2022 @ 5:35am
okeating  [developer] 19 Jul, 2022 @ 10:40am 
Hello thanks very much for these stack traces they are very helpful, I am not entirely sure what is going wrong but I have pushed a couple of things that should fix it, I noticed you are using 80 meter stations which I haven't tested a lot there may be some issues with those. Let me know how you get on.
Ferocious 20 Jul, 2022 @ 12:52am 
Hey, thanx for the reply, looks like the error with bus stops was because of another mod, that altered the town building logic, making towns less symmetric\more chaotic. I decided to test your mod complete vanilla and this time it build three bus stops as intended.

However, in my complete vanilla test I encountered another error trying to connect two towns via railway, it stuck after initial infrastructure was build (depot, bus stops), no rails were built. Heres stdout:
active mods: *2820656841/1 (4) (AI Builder) config dict: climate: temperate vehicles: all nameList: asia environment: temperate difficulty: hard mod params: : { advancedOptions.cargoSupplySensitivityScale = 4, advancedOptions.emissionSensitivityScale = 0, advancedOptions.infrastructureMaintenanceScale = 2, advancedOptions.infrastructurePurchaseCostScale = 2, advancedOptions.loanInterestScale = 2, advancedOptions.maximumLoanScale = 2, advancedOptions.privateTransportDestinationsSensitivityScale = 4, advancedOptions.publicTransportDestinationsSensitivityScale = 4, advancedOptions.stationOverflowSensitivityScale = 0, advancedOptions.trafficSpeedSensitivityScale = 0, advancedOptions.vehicleMaintenanceScale = 2, advancedOptions.vehiclePurchaseCostScale = 2, economy.industryDevelopment.closureProbability = 2, economy.townDevelopment.cargoNeedsPerTown = 2, locations.industry.maxNumberPerArea = 0, locations.industry.targetMaxNumberPerArea = 1, } script load from test-1.sav.lua achievements earnable: 0 init version: 329 map seed text: TOXVWC debug mode is active adding archive res/models/models.zip ModelRep: 9215.38 ms No resources are missing! Shader reload took : 141.941 ms prepare material ubo's: 278.747 ms Using 800 UBOs, total 0 bytes Texture load error: file name empty Initial material index generation: 27588.6 ms Texture load error: file name empty Texture load error: file not found: res/textures/ui/construction/ai_builder_track_xover.tga createComponents start, lua used memory= 7763784 COULD NOT FIND GAME BAR FOR SOME RAESON! createComponents start, lua used memory= 7774724 in buildStraightenPanel built boxlayout, resultview createComponents end, lua used memory= 7968708 An error was caught res/scripts/init.lua:128: creating globals by assignment is not allowed (variable was comp) Did you forget to add 'local' before your variable? stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:58> [C]: in function 'error' res/scripts/init.lua:128: in function '__newindex' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_base_util.lua:2919: in function 'createIconBar' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:3334: in function 'buildIndustryChoicesPanel' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:1080: in function 'populateIndustryChoices' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:1099: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:1097> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2219: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2212> About to send command to build town result In engine thread: game.config.discoveredProduction ? nil found api.res.getBaseConfig().discoveredProduction ? nil { } ****************************************************************************** Connecting towns Kabul with Zunyi using rail ****************************************************************************** attempting to connect Kabul with Zunyi { testDataCollision = { collisionEntities = { [1] = { entity = 180015, }, [2] = { entity = 251858, }, }, autoRemovalEntity2models = { [18852] = { [1] = 0, [2] = 0, [3] = 0, }, [38954] = { [1] = 0, [2] = 0, }, [60009] = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0, [7] = 0, }, [76045] = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0, [7] = 0, [8] = 0, [9] = 0, [10] = 0, [11] = 0, [12] = 0, [13] = 0, [14] = 0, [15] = 0, [16] = 0, [17] = 0, [18] = 0, [19] = 0, [20] = 0, [21] = 0, [22] = 0, [23] = 0, [24] = 0, [25] = 0, [26] = 0, [27] = 0, }, [91044] = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0, [7] = 0, [8] = 0, [9] = 0, [10] = 0, [11] = 0, [12] = 0, [13] = 0, }, [91101] = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0, [7] = 0, [8] = 0, [9] = 0, [10] = 0, [11] = 0, [12] = 0, [13] = 0, [14] = 0, }, [97425] = { [1] = 0, [2] = 0, }, [97481] = { [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0, [6] = 0, [7] = 0, [8] = 0, }, [141982] = { [1] = 1, }, [158091] = { [1] = 1, }, [163664] = { [1] = 1, }, [163841] = { [1] = 1, }, [163857] = { [1] = 1, [2] = 1, }, [164482] = { [1] = 1, }, }, fieldEntities = { }, buildingEntities = { }, }, testDataError = { [1] = "Collision", }, } About to build command About to sent command attempt command result was true begin connecting stations getting depot node 259170 at k= 2 An error was caught res/scripts/init.lua:128: creating globals by assignment is not allowed (variable was nextT) Did you forget to add 'local' before your variable? stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:58> [C]: in function 'error' res/scripts/init.lua:128: in function '__newindex' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_preparation.lua:4275: in function 'prepareRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:2354: in function 'tryBuildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4138: in function 'buildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:10234: in function 'buildRouteBetweenStations' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:911: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:806> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334> About to sent command depot connect result was true About to sent command depot connect result was true
Last edited by Ferocious; 20 Jul, 2022 @ 12:58am
okeating  [developer] 20 Jul, 2022 @ 5:09am 
Sorry about that - basically Transport Fever doesn't allow global variable assignment... unless you are running in debug mode (which I am all the time) so it makes it hard to spot these mistakes. I even tried to turn it off but I couldn't get it to error on global variable assignment which is annoying, so I very much rely on feedback like this - thank you! I have pushed a fix
Ferocious 20 Jul, 2022 @ 7:33pm 
no problem at all, thank YOU for this awesome mod, I'll test it more and provide further feedback, cheers!
Ferocious 20 Jul, 2022 @ 9:54pm 
MODDED GAME though I'll post it in case you'll want to check it anyway (gonna test in vanilla a bit later)

UPDATE: can confirm in complete vanilla, getting this error when connecting a town to an existing line (mod builds rails, bus stops, depots as intended, tho):
Connecting towns Sacheon with Daegu using rail ****************************************************************************** attempting to connect Sacheon with Daegu { testDataCollision = { collisionEntities = { }, autoRemovalEntity2models = { [17223] = { [1] = 0, }, [23458] = { [1] = 0, [2] = 0, }, [96730] = { [1] = 1, }, }, fieldEntities = { }, buildingEntities = { }, }, testDataError = { }, } About to build command About to sent command attempt command result was true begin connecting stations getting depot node 202233 at k= 2 Result of route build callback to connect 210435 and 209705 was true Result to build depot connection for 183566 was true About to sent command depot connect result was true About to mark as completed, currentBuildParams= table: 0000021F15C270D0 An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:1840: attempt to perform arithmetic on local 'purchaseTime' (a nil value) stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function '__sub' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:1840: in function 'checkForOldVehicles' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2169: in function 'getLineReport' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:1087: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:1085> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334>

encountered this when clicking on LINES → REPORT PROBLEM LINES — nothing happens, the tab remains empty:
An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:1840: attempt to perform arithmetic on local 'purchaseTime' (a nil value) stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function '__sub' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:1840: in function 'checkForOldVehicles' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2169: in function 'getLineReport' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2355: in function 'getLinesReport' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2622: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2619> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2425: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2422>

thank you!
Last edited by Ferocious; 21 Jul, 2022 @ 4:57am
Ferocious 21 Jul, 2022 @ 1:48am 
had a CTD in vanilla, ctdout:
Additional info extracted from the previous state: Uncaught exception while in class UI::CSelector Exception type: Lua exception This error is usually caused by modding. Some game resources contain incorrect data. Details: Error message: res/scripts/init.lua:128: creating globals by assignment is not allowed (variable was customRouteScoring) Did you forget to add 'local' before your variable? Minidump: C:/Program Files (x86)/Steam/userdata/110813165/1066780/local/crash_dump/a8470a54-5a8e-4208-bfdd-624905bdcff3.dmp In file: C:\GitLab-Runner\builds\1BJoMpBZ\0\ug\urban_games\train_fever\src\Game/scripting/error_handling.h:14 In function: void __cdecl scripting::CheckResult<void>(struct sol::protected_function_result) __CRASHDB_CRASH__ struct lua::LuaException: C:\GitLab-Runner\builds\1BJoMpBZ\0\ug\urban_games\train_fever\src\Game/scripting/error_handling.h:14: void __cdecl scripting::CheckResult<void>(struct sol::protected_function_result): res/scripts/init.lua:128: creating globals by assignment is not allowed (variable was customRouteScoring) Did you forget to add 'local' before your variable? Exception type: Lua exception This error is usually caused by modding. Some game resources contain incorrect data. Details: Error message: res/scripts/init.lua:128: creating globals by assignment is not allowed (variable was customRouteScoring) Did you forget to add 'local' before your variable? Minidump: C:/Program Files (x86)/Steam/userdata/110813165/1066780/local/crash_dump/a8470a54-5a8e-4208-bfdd-624905bdcff3.dmp In file: C:\GitLab-Runner\builds\1BJoMpBZ\0\ug\urban_games\train_fever\src\Game/scripting/error_handling.h:14 In function: void __cdecl scripting::CheckResult<void>(struct sol::protected_function_result)
Last edited by Ferocious; 21 Jul, 2022 @ 4:38am
Ferocious 21 Jul, 2022 @ 5:06am 
some more errors caught in complete vanilla testing (attempted to connect a town to another town which already had a station connected to a line, mod built a single way rail this time and didn't bough any vehicles):
Connecting towns Gongju with Jeongeup using rail ****************************************************************************** attempting to connect Gongju with Jeongeup { testDataCollision = { collisionEntities = { }, autoRemovalEntity2models = { [89179] = { [1] = 1, }, [206321] = { [1] = 1, }, [206322] = { [1] = 1, }, }, fieldEntities = { }, buildingEntities = { }, }, testDataError = { }, } About to build command About to sent command attempt command result was true begin connecting stations getting depot node 202098 at k= 2 An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:679: failed edgeId removal uniquenessCheck at 69524 stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:58> [C]: in function 'assert' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:679: in function 'setupProposal' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:3984: in function 'tryBuildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4138: in function 'buildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:10234: in function 'buildRouteBetweenStations' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:911: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:806> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2336: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2334> About to sent command depot connect result was true command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 992400, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 992600, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 992800, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 993000, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 993200, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 993400, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 993600, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 993800, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, } command was completed, success= false { playerEntity = 99956, depotEntity = 215470, config = { vehicles = { [1] = { part = { modelId = 3348, reversed = false, loadConfig = { [1] = 0, }, color = { x = -1, y = -1, z = -1, }, logo = "", }, purchaseTime = 994000, maintenanceState = 1, targetMaintenanceState = 0, autoLoadConfig = { [1] = 1, }, }, }, vehicleGroups = { [1] = 1, }, }, resultVehicleEntity = -1, }
Last edited by Ferocious; 21 Jul, 2022 @ 5:12am
okeating  [developer] 24 Jul, 2022 @ 8:13am 
Thanks again for these reports, they have been very useful, i have worked through them and have just pushed a set of changes that I hope will fix them, let me know!
Ferocious 26 Jul, 2022 @ 5:48am 
So far so good, I had't encounter these errors after update so far, thank you for your work! Btw, I just had an error I previously not encountered, it appeared when I tried to build a rail line between a steel mill and a machines factory. At first no rails were build, only stations and depot. On second attempt the rails were built successfully and no error appeared, but I'll post log anyway just in case:

****************************************************************************** Connecting industry Fukuoka Steel mill with Toda Machines factory using rail ****************************************************************************** About to sent command build stations result was true An error was caught [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:569: stack index 2, expected number, received nil: not a numeric type (bad argument into 'sol::basic_object<sol::basic_reference<0> >(sol::basic_table_core<0,sol::basic_reference<0> >, ecs::Entity, enum scripting::ComponentType, sol::this_state)') stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:58> [C]: in function 'getComponent' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:569: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:566> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2362: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2360>

and another one, this time trying to open problem lines tab:

An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2738: bad argument #1 to 'floor' (number expected, got nil) stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:60: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:58> [C]: in function 'floor' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2738: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_line_manager.lua:2709> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2451: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2448>
Last edited by Ferocious; 26 Jul, 2022 @ 6:14am
okeating  [developer] 26 Jul, 2022 @ 11:10am 
Great - thanks for that, the first error I don't know whats causing it, its basically trying to find the station it just built but cannot for some reason...
The second one I had noticed too, I have just pushed a fix for it :)
Ferocious 22 Aug, 2022 @ 2:35pm 
Hey, had some time to get back to testing, awesome new features btw. I tested complete route building and it almost worked! The only thing that went wrong is the final station, the turn before it was too sharp and thus not properly connected (I guess), heres a screenshot: https://disk.yandex.ru/d/lu44Pdf3haeMDw

Got this in the stdout: https://pastebin.com/L8bC2qAX
Last edited by Ferocious; 23 Aug, 2022 @ 7:51am
Ferocious 22 Aug, 2022 @ 3:07pm 
another bit of stdout:
Set guiEventListener to function: 0000021FF45002E0 Set guiEventListener to nil In engine thread: game.config.discoveredProduction ? nil found api.res.getBaseConfig().discoveredProduction ? nil { } Call to build completeRoute Overriding isElevated to false Overriding isUnderground to false Overriding routeScoreWeights to table: 00000223420C93A0 buildCompleteRoute: Swapping town order for depot An error was caught res/scripts/init.lua:128: creating globals by assignment is not allowed (variable was stationPerpTangent) Did you forget to add 'local' before your variable? stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:66: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:64> [C]: in function 'error' res/scripts/init.lua:128: in function '__newindex' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1571: in function 'getStationPositionAndRotation' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:786: in function 'buildTrainStationConstructionForTown' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:711: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:633> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2645: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2643> About to sent command depot connect result was true
Ferocious 22 Aug, 2022 @ 3:15pm 
and another one, no rails were built:
Call to build completeRoute Overriding isElevated to false Overriding isUnderground to false Overriding routeScoreWeights to table: 00000223420C93A0 buildCompleteRoute: Swapping town order for depot An error was caught res/scripts/init.lua:128: creating globals by assignment is not allowed (variable was stationPerpTangent) Did you forget to add 'local' before your variable? stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:66: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:64> [C]: in function 'error' res/scripts/init.lua:128: in function '__newindex' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_new_connections_evaluation.lua:1571: in function 'getStationPositionAndRotation' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_construction_util.lua:786: in function 'buildTrainStationConstructionForTown' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:711: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:633> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2645: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2643> About to sent command depot connect result was true Texture load error: file name without extension: res/textures/?player-logo-array Industry 'Sano Goods factory': connected Industries: 1/1 connected Connect industry: 1819.08 ms Industry 'Funabashi Steel mill': connected Industries: 1/1 connected Connect industry: 1803.48 ms Set guiEventListener to function: 0000021FF45002E0 Industry 'Toyonaka Fuel refinery': connected Industries: 1/1 connected Connect industry: 1842.04 ms Set guiEventListener to nil In engine thread: game.config.discoveredProduction ? nil found api.res.getBaseConfig().discoveredProduction ? nil { } Call to build completeRoute Overriding isElevated to false Overriding isUnderground to false Overriding routeScoreWeights to table: 00000220645EEA70 buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping station order BuildCompleteRoute: Got 1 of 18 expected buildCompleteRoute: Swapping station order An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:738: edge-80 type=1 typeIndex=17 stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:66: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:64> [C]: in function 'assert' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:738: in function 'setupProposal' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4524: in function 'tryBuildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4678: in function 'buildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:12252: in function 'buildRouteBetweenStations' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:829: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:732> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2645: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2643> An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:746: edge-24 type=2 typeIndex=4 stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:66: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:64> [C]: in function 'assert' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:746: in function 'setupProposal' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4524: in function 'tryBuildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4678: in function 'buildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:12252: in function 'buildRouteBetweenStations' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:11936: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:11936> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2645: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2643> About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true Industry 'Naha Chemical plant': connected Industries: 1/1 connected Connect industry: 1808.81 ms About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true About to sent command depot connect result was true Industry 'Katsushika Oil refinery': connected Industries: 1/1 connected Connect industry: 1877.52 ms Set guiEventListener to function: 0000021FF45002E0 Set guiEventListener to nil
Ferocious 22 Aug, 2022 @ 3:46pm 
and some more, again, no rails:
Call to build completeRoute Overriding routeScoreWeights to table: 0000022077D0FF50 Overriding isUnderground to false Overriding isElevated to false buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping town order for depot buildCompleteRoute: Swapping station order An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:738: edge-37 type=1 typeIndex=17 stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:66: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:64> [C]: in function 'assert' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:738: in function 'setupProposal' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4524: in function 'tryBuildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4678: in function 'buildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:12252: in function 'buildRouteBetweenStations' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:829: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:732> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2645: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2643> An error was caught F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:738: edge-5 type=1 typeIndex=21 stack traceback: [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:66: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:64> [C]: in function 'assert' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:738: in function 'setupProposal' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4524: in function 'tryBuildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:4678: in function 'buildRoute' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:12252: in function 'buildRouteBetweenStations' F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:11936: in function <F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/scripts/ai_builder_route_builder.lua:11936> [C]: in function 'xpcall' [string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2645: in function <[string "F:/Games/Steam/steamapps/workshop/content/1066780/2820656841/res/config/game_script/ai_builder_script.lua"]:2643>
Last edited by Ferocious; 23 Aug, 2022 @ 7:53am
< >
Showing 1-15 of 34 comments
Per page: 1530 50