Problems when changing era name through the addme [Solved]
Posted: Fri Feb 17, 2017 8:44 am
by CT108
Hi GT
I have a problem : my game is crashing when I try to change the name of an era through the addme.lua
I know that the error is in the part that I've underlined but not where exactly in this part
Notice that I've added a new era ( DAFy_con ) and everything works fine when I don't try to change the name of an era.
my addme.lua
Hidden/Spoiler:
[code]--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)
Look at this part at the end - mode_eli_g = 1,} change = {
Make it look like this - mode_eli_g = 1, change = {
I Removed the - "}" from behind "change = {"
Re: Game crashing when changing an era name through the addm
Posted: Fri Feb 17, 2017 7:52 pm
by Samee3
In \Data_***\addme, there should be a "scriptmunge" file. Check that for errors.
Also, there are a number of mungelogs in \Data_***\_Build\Common. Check those too.
Re: Game crashing when changing an era name through the addm
And Samee, I checked every logs in \Data_***\_Build\Common but there isn't any errors. Also I have an error at my "scriptmunge" file, but I'm not sure if it will help me so much.
My scriptmunge
Hidden/Spoiler:
Logging ScriptMunge
11:23:5502/18/17
ERROR[addme.lua]:Could not read input file.ERROR[addme.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
Every words that are bold are the "solution". In this case, I've just forgotten a "}" at the end...
[facepalm]
Excellent! I think we've all been here......
Here's a friendly tip: if you don't already, use a text editor that has syntax/bracket highlighting, specifically for LUA. Saves sooo many headaches.
My favorites are Notepad++, and Visual Studio Code.
Re: Game crashing when changing an era name through the addm
Posted: Sat Feb 18, 2017 11:54 am
by CT108
Samee3 wrote:
Excellent! I think we've all been here......
Here's a friendly tip: if you don't already, use a text editor that has syntax/bracket highlighting, specifically for LUA. Saves sooo many headaches.
My favorites are Notepad++, and Visual Studio Code.
I'm actually using Notepad ++ but I didn't looked first a the colors of the "}"
And today I retied and watched with the colors, and I found where was the problem
Re: Problems when changing era name through the addme [Solve