Compilation error - already defined

+
Compilation error - already defined

Hello. So I was doing some mods merging, tool provided on nexus page is not working very well so far, so I use it to find out what files are in conflict and then I use winmerge to find differences in .ws files. It was 2 mods with playerwitcher.ws and 5 mods with r4player.ws. I merged all of them just fine, and created one folder with all files from all mods I merged. But in one file, which didn't even need merging, I get compilation error.

Error [content0]game\gui\menus\inventorymenu.ws(35): Structure 'SentStatsData' already defined.
Error [content0]game\gui\menus\inventorymenu.ws(9): Enum 'EInventoryMenuState' already defined.
Error [content0]game\gui\menus\inventorymenu.ws(18): Enum 'InventoryMenuTabIndexes' already defined.
Error [content0]game\gui\menus\inventorymenu.ws(28): Enum 'InventoryMenuStashTabIndexes' already defined.
Error [content0]game\gui\menus\inventorymenu.ws(41): Class 'CR4InventoryMenu' already defined.

Already defined: does that mean that these lines are defined in different .ws file already in merged folder and I can delete them?
 
Most probably two mods changed same piece of code or winmerge failed to merge them properly. Code merging is a tool meant to help programmers work on the same project. Not for merging projects which wanted to achieve two different things by changing the exact same piece of code. And even then merging conflicts do occur and sometimes need to be resolved manually. Code merging is not a magic wand which can merge every two mods with each other.
 
Nevermind, I figured it out. Here is what I did:

Using script merger from nexus, I found out what files are in conflict with each other. Then I copied all of conflicted files to one folder, and using winmerge compared one text file to others and copied changes to merged file I use in mods folder. I did that and now everything is working.
 
Manual merge only, but winmerge will show me differences between two files and I decide what lines should I copy from one file to another and which ones I should not, it's only convenient so I don't have to press CTRL+C and CTRL+V all the time, I only copy differences from left to right with one click. I never used winmerge to automatically merge files, I don't even know how :D

Basically, I copied all r4player.ws files, created one file to which I copied all changes from every other file, then deleted all r4player.ws files from mods folder and copied my merged r4player.ws file to one mod. Before, I merged all mods to one folder and that didn't work, now it does when all unconflicted files are left in their own mod folders.
 
Top Bottom