Jump to content

Duplicate Error for a Custom class


guibuni

Recommended Posts

Hi , i'm trying to make a playable Avatar with custom class , i have been succesful in making the Class itself and it works alright , however , i can't make it work with the proper Avatar, i've followed the tutorial on the sticky post but it fails to compile everytime and i keep getting this error:

 

Warning/Error Summary
---------------------
C:\Program Files (x86)\Steam\steamapps\common\XCOM 2 SDK\binaries\..\Development\Src\AvatarClass\Classes\..\..\XComGame\Mods\AvatarClass\X2Character_AvatarClass.uc : Error, Script vs. class name mismatch (X2Character_AvatarClass/X2Character_Avatar)
C:\Program Files (x86)\Steam\steamapps\common\XCOM 2 SDK\binaries\..\Development\Src\AvatarClass\Classes\..\..\XComGame\Mods\AvatarClass\X2Character_DefaultCharacters_AvatarClass.uc : Error, Script vs. class name mismatch (X2Character_DefaultCharacters_AvatarClass/X2Character_DefaultCharacters)
C:\Program Files (x86)\Steam\steamapps\common\XCOM 2 SDK\Development\Src\AvatarClass\Classes\X2Character_DefaultCharacters.uc(80) : Error, Unexpected end of file at end of Class
C:\Program Files (x86)\Steam\steamapps\common\XCOM 2 SDK\binaries\..\Development\Src\AvatarClass\Classes\..\..\XComGame\Mods\AvatarClass\X2Character_DefaultCharacters_AvatarClass.uc : Warning, Duplicate class name: X2Character_DefaultCharacters also exists in package XComGame

Failure - 5 error(s), 1 warning(s) (3 Unique Errors, 1 Unique Warnings)

 

Can anyone help me? I can also provide the files if you want to take a look

Link to comment
Share on other sites

These messages indicate some specific syntax errors. The first one tells you that the class name and the file name have to match. The third one probably means that you have a mismatch of open curly brackets with close curly brackets. It may be helpful to look at some other mods which change uc files; it is a big step up in complexity from ini file modding. I recommend the rifleman mod at steam workshop, which adds some abilities, but is not all that complicated.

Link to comment
Share on other sites

1.) Class name and file name must match.

so, change the class from X2Character_Avatar to X2Character_AvatarClass *OR* change the file name from X2Character_AvatarClass.uc to X2Character_Avatar.uc

2.) Basically the same as number 1, X2Character_DefaultCharacters in the file X2Character_DefaultCharacters_AvatarClass.uc must match ... and because X2Character_DefaultCharacters is a base class, you cannot use that name.

3.) Caused by number 2.

4.) Caused by number 2.

 

Naming schemes must ALWAYS match, or the compiler wont know where to look. The errors tell you this explicitly.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...