Hallo zusammen,
ich erstelle eine Mod mit mehreren Litfaßsäulenvarianten. Diese sollen im Asset-Menü in einer Untergruppe auswählbar sein. Die Ursprungsmod mit einer Säule habe ich via Model Editor ins Hauptprogramm bringen können, auch das Kategorieicon wurde im Assetfenster mit UI-Vorschaubildern angezeigt - soweit kein Problem. Im weiteren Schritt wollte ich die Varianten einbauen. Dazu habe ich u.a. die con-Datei geändert, wobei ich von vermutlich ähnlichen Mods Scriptbausteine übernommen habe.
Ich erhalte folgende Meldungen:
Model Editor: siehe jpg
stdout.txt:
__CRASHDB_CRASH__ struct lua::LuaException: ..\..\src\Lib\lua\State.cpp:402: void __cdecl lua::State::DoBuffer(const char *,int,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &): [string "G:/Steam/userdata/297617233/1066780/local/sta..."]:30: unexpected symbol near '}'
Exception type: Lua exception
Details:
Error message: [string "G:/Steam/userdata/297617233/1066780/local/sta..."]:30: unexpected symbol near '}'
File name: G:/Steam/userdata/297617233/1066780/local/staging_area/sab_Lit_V1_1/res/construction/asset/sab_Lit_V1.con
Minidump: G:/Steam/userdata/297617233/1066780/local/crash_dump/97ef7873-794d-4525-b694-8f8bec80bfd4.dmp
In file: ..\..\src\Lib\lua\State.cpp:402
In function: void __cdecl lua::State::DoBuffer(const char *,int,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)
In der con-Datei steht folgender Code:
function data()
return {
type = "ASSET_DEFAULT",
description = {
name = _("Litfass V1"),
description = _("")
},
availability = {
yearFrom = 1950,
},
buildMode = "MULTI",
categories = { "sabon" },
order = 999,
skipCollision = true,
autoRemovable = true,
updateFn = function(params)
local result = { }
local models = {
"sab_Lit_V1_1.mdl",
"sab_Lit_V1_2.mdl",
"sab_Lit_V1_3.mdl",
"sab_Lit_V1_4.mdl",
"sab_Lit_V1_5.mdl",
}
result.models = { { id = models[params.model + 1], transf = unitMat, } }
transf = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0.0, 1 }
} }
result.terrainAlignmentLists = { {
type = "EQUAL",
faces = { }
} }
return result
end
}
end
Da ich die Fehlermeldung nicht verstehe, wie muss ich den Code ändern?
Zweites Thema/Frage, wo ich schon mal dabei bin: besteht die Chance, das UG ein strassenkompatibles eingleisiges Tramgleis rausbringt, das z.B. für Überlandbereiche durch Blockstellen wie beim Bahnbereich gesichert werden kann, so das die Bahnen nicht mehr ineinander durchfahren?
Danke schon mal, sabon