Mods Recipe and 7.3.0 compatibility

Due to human (non-bot) spam the first contribution of a user has to be reviewed and activated manually, all further contributions do not require this.
As long as a user does not have at least one reviewed and activated contribution, the user is unable to edit his profile, set a avatar, title picture or a signature.
  • Hi,

    I think some modders know this issue if they have already tested the staging version... but this post is also here to help some users who get this error.

    So.. I've just tested the latest staging version (7.3.0) and all mods containing a recipe will crash servers on loading.


    If your mod is a not compiled .cs file, you'll get this error :

    Code
    Exception
    System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> System.Exception: Error in FormTest at 134: The best overloaded method match for 'Eco.Gameplay.DynamicValues.SkillModifiedValue.SkillModifiedValue(float, Eco.Gameplay.DynamicValues.ModificationStrategy, System.Type, Eco.Shared.Localization.LocString)' has some invalid arguments (CS1502)
    Error in FormTest at 134: Argument 4 : impossible de convertir de 'string' en 'Eco.Shared.Localization.LocString' (CS1503)

    My error text is in french, so in english it say : "Can't convert 'string' in 'Eco.Shared.Localization.LocString'.

    Zitat

    If your mod is a compiled DLL... the server just freeze on loading... and don't show any error.


    This is due to the new "Localizer" class and if you have a recipe in your script you should add [ICODE]using Eco.Shared.Localization;[/ICODE] on top of your script, and modify this line :
    [ICODE]SkillModifiedValue value = new SkillModifiedValue( ... , ... , ... , "craft time");[/ICODE]

    With this :
    [ICODE]SkillModifiedValue value = new SkillModifiedValue(... , ... , ... , Localizer.Do("craft time"));[/ICODE]

    I don't know if any other "string" will be impacted by this issue.

    Obviously, don't make any change while you don't update your server.

    Einmal editiert, zuletzt von GeeknessFr (26. März 2018 um 18:44)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!