Why shows me error? Help with personal mod!

Well… hello! I’m a new member of this forum and i join for some answers about modding. I complete the game and after play long time i think about using mods. Unfortunaly, almost every mod was broken so i decided to create a simple mod with API and the example.js. The problem was here, i just add a few topics and some researches, i learn a bit about code and finish the .js file, but when i go to the game it keeps showing the same error: Uncaught SyntaxError: Unexpected token )
I look for some help but i didn’t understand a lot, the problem was in line 83:
function(company) {
This line causes me troubles and not only that, if i delete this line and the research, the problem keeps appearing in another research, so… my question is, can somebody explain me why this is happening or what can i do? Please, answers will be appreciated :smile: Thanks

You should show us the code. You could’ve just added one ‘)’ too much

Sure! Heres the full code:

var Examples = {};
(function() {
Examples.addTopic = function() {
GDT.addTopics([{
id: “Defensa De Torre”,
name: “Defensa De Torre”.localize(“game topic”),
genreWeightings: [.8, .6, .8, .6, 1, .9],
audienceWeightings: [1, 0.9, 0.7]
}]); {
([
id
]);
“Cocina”,
name;
“Cocina”.localize(“game topic”),
genreWeightings;
[.6, .6, .6, 1, .9, 1],
audienceWeightings;
[1, 0.8, 0.7]
} {
([
id
]);
“Cartas”,
name;
“Cartas”.localize(“game topic”),
genreWeightings;
[.8, .6, .8, 1, 1, .9],
audienceWeightings;
[1, 0.9, 0.6]
} {
([
id
]);
“Puzzle”,
name;
“Puzzle”.localize(“game topic”),
genreWeightings;
[.8, 1, .6, .7, 1, 1],
audienceWeightings;
[1, 1, 0.9]
} {
([
id
]);
“Simulador”,
name;
“Simulador”.localize(“game topic”),
genreWeightings;
[.6, .7, .6, 1, .8, 1],
audienceWeightings;
[0.9, 1, 0.6]
} {
([
id
]);
“Lucha”,
name;
“Lucha”.localize(“game topic”),
genreWeightings;
[1, .9, .6, .9, .7, .8],
audienceWeightings;
[0.6, 0.8, 1]
}
};
Examples.addResearch = function() {
GDT.addResearchItem({
id: “Menu Improvisado”,
name: “Menu Improvisado”.localize(),
v: 1,
canResearch: function(company) {
return LevelCalculator.getMissionLevel(‘Graphic’) > 2
},
category: “Graphic”,
categoryDisplayName: “Graphic”.localize()
}); {
id: “Menu Completo”,
name;
“Menu Completo”.localize(),
v;4,
canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 5
        };
        category: "Graphic",
        categoryDisplayName;
        "Graphic".localize()
    }; {
        id: "HUD Basico",
        name;
        "HUD Basico".localize(),
        v;2,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 2
        };
        category: "Engine",
        categoryDisplayName;
        "Engine".localize()
    }; {
        id: "HUD Avanzado",
        name;
        "HUD Avanzado".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 6
        };
        category: "Engine",
        categoryDisplayName;
        "Engine".localize()
    }; {
        id: "Pixel Art",
        name;
        "Pixel Art".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 3
        };
        category: "Graphic",
        categoryDisplayName;
        "Graphic".localize()
    }; {
        id: "Reflejos",
        name;
        "Reflejos".localize(),
        v;5,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 5
        };
        category: "Graphic",
        categoryDisplayName;
        "Graphic".localize()
    }; {
        id: "Graficos 360",
        name;
        "Graficos 360".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 4
        };
        category: "Graphic",
        categoryDisplayName;
        "Graphic".localize()
    }; {
        id: "Graficos 720",
        name;
        "Graficos 720".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 5
        };
        category: "Graphic",
        categoryDisplayName;
        "Graphic".localize()
    }; {
        id: "Resolucion 2K",
        name;
        "Resolucion 2K".localize(),
        v;8,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 7
        };
        category: "Graphic",
        categoryDisplayName;
        "Graphic".localize()
    }; {
        id: "Resolucion 4K",
        name;
        "Resolucion 4K".localize(),
        v;12,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Graphic') > 10
        };
        category: "Graphic",
        categoryDisplayName;
        "Graphic".localize()
    }; {
        id: "Puntos De Vista",
        name;
        "Puntos De Vista".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 5
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Canciones Famosas",
        name;
        "Canciones Famosas".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getFeatureLevel(GameManager.company, 'Soundtrack') > 2
        };
        category: "Sound",
        categoryDisplayName;
        "Sound".localize()
    }; {
        id: "Jefes",
        name;
        "Jefes".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('A.I.') > 2
        };
        category: "A.I.",
        categoryDisplayName;
        "AI".localize()
    }; {
        id: "PNJs",
        name;
        "PNJs".localize(),
        v;2,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('A.I.') > 2
        };
        category: "A.I.",
        categoryDisplayName;
        "AI".localize()
    }; {
        id: "Creditos Interactivos",
        name;
        "Creditos Interactivos".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 3
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Parkour",
        name;
        "Parkour".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getFeatureLevel(GameManager.company, 'Skill Trees') > 2
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Misiones Secundarias",
        name;
        "Misiones Secundarias".localize(),
        v;2,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Story/Quests') > 2
        };
        category: "Story/Quests",
        categoryDisplayName;
        "Story/Quests".localize()
    }; {
        id: "Multiples Historias",
        name;
        "Multiples Historias".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Story/Quests') > 4
        };
        category: "Story/Quests",
        categoryDisplayName;
        "Story/Quests".localize()
    }; {
        id: "Traducciones",
        name;
        "Traducciones".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Dialogs') > 5
        };
        category: "Dialogs",
        categoryDisplayName;
        "Dialogs".localize()
    }; {
        id: "Mundo Aleatorio",
        name;
        "Mundo Aleatorio".localize(),
        v;8,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('World Design') > 5
        };
        category: "World Design",
        categoryDisplayName;
        "World Design".localize()
    }; {
        id: "Fisica Real",
        name;
        "Fisica Real".localize(),
        v;12,
        canResearch;

        function(company) {
            return LevelCalculator.getFeatureLevel(GameManager.company, 'Advanced Physics') > 3
        };
        category: "Engine",
        categoryDisplayName;
        "Engine".localize()
    }; {
        id: "Objetos Desbloqueables",
        name;
        "Objetos Desbloqueables".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 4
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id;
        "Creacion De Personaje",
        name;
        "Creacion De Personaje".localize(),
            v;
        6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 3
        };
        category: "Gameplay",
            categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Vehiculos",
        name;
        "Vehiculos".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 4
        };
        category: "Engine",
        categoryDisplayName;
        "Engine".localize()
    }; {
        id: "Chat En Juego",
        name;
        "Chat En Juego".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getFeatureLevel(GameManager.company, 'Online Play') > 2
        };
        category: "Engine",
        categoryDisplayName;
        "Engine".localize()
    }; {
        id: "Animales/Mascotas",
        name;
        "Animales/Mascotas".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('A.I.') > 5
        };
        category: "A.I.",
        categoryDisplayName;
        "A.I.".localize()
    }; {
        id: "Musica Personalizada",
        name;
        "Musica Personalizada".localize(),
        v;8,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Sound') > 3
        };
        category: "Sound",
        categoryDisplayName;
        "Sound".localize()
    }; {
        id: "Trucos",
        name;
        "Trucos".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 3
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Contenido Descargable",
        name;
        "Contenido Descargable".localize(),
        v;8,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 7
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Foro Del Juego",
        name;
        "Foro Del Juego".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 7
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Coleccionables",
        name;
        "Coleccionables".localize(),
        v;2,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 3
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Opciones Avanzadas",
        name;
        "Opciones Avanzadas".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 4
        };
        category: "Engine",
        categoryDisplayName;
        "Engine".localize()
    }; {
        id: "Artefactos",
        name;
        "Artefactos".localize(),
        v;6,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Gameplay') > 5
        };
        category: "Gameplay",
        categoryDisplayName;
        "Gameplay".localize()
    }; {
        id: "Destruccion Permanente",
        name;
        "Destruccion Permanente".localize(),
        v;12,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('World Design') > 7
        };
        category: "World Design",
        categoryDisplayName;
        "World Design".localize()
    }; {
        id: "Items Generados Al Azar",
        name;
        "Items Generados Al Azar".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Level Design') > 6
        };
        category: "Level Design",
        categoryDisplayName;
        "Level Design".localize()
    }; {
        id: "Items Soltados",
        name;
        "Items Soltados".localize(),
        v;4,
        canResearch;

        function(company) {
            return LevelCalculator.getMissionLevel('Level Design') > 6
        };
        category: "Level Design",
        categoryDisplayName;
        "Level Design".localize()
    };
};

})();

I hope you understand that i speak spanish, thats why the mod is in that language, anyway, i hope the problem doesn’t be so bad, i change the code a lot of times because many errors in .js, but now this one is stopping me, so thanks for help

This code is extremely messy and buggy can you format all the code in the file to show like this?

It will make it easier to spot out all the bugs

You can just copy it and paste it into Notepad++
and after looking at it for a brief moment I couldn’t see anything particulary wrong, but I’ll look closer.

Im sorry SnowyOwl but i when i try to copy the code the post automatically shows in that way, all messy, i don’t understand why
Haxor, thanks for helping, i didn’t see anything weird neither but it just keeps showing error