Results 1 to 17 of 17
  1. #1
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default Object Class ClearConfig()

    I'm converting working code from my 2K4 mutator over to UT3 and the UT3 compiler spat on the Object class ClearConfig() native function.

    I use it for removing PerObjectConfig sections from the ini file.

    I even tried to use the Static version and it complained as well.

    "Error, Unrecognized member 'ClearConfig' in class 'MyClass'"

    From the UT3 Object class file:

    /**
    * Removes the values for all configurable properties in this object's class from the .ini file.
    *
    * @param PropertyName if specified, only this property's value will be removed.
    */
    native(537) final function ClearConfig( optional string PropertyName );

    /**
    * Removes the values for all configurable properties in this object's class from the .ini file.
    *
    * @param PropertyName if specified, only this property's value will be removed.
    */
    native static final function StaticClearConfig( optional string PropertyName );


    As I said at the beginning, this is code that works in my UT2K4 version of the mutator, and if I comment out the call to ClearConfig(), it compiles.

    I completely understand the functioning of ini files in the 2K4 sense. My question relates to anything that has changed in UT3.

    I don't know of any other way to remove PerObject ini file sections.

    Any ideas?

  2. #2
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    Anyone?

    I've spent a day trying to get a DataStore to work but the best I get is a crash.

  3. #3
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    Ok, this is just silly. Surely someone else has tried this and found that it doesn't compile. Or am I the only one using a PerObjectConfig class that want's to erase the section from the ini file ?

    At least if it's just some sort of issue my end, someone else can post and tell me that it works their end.

    Someone try it please!

  4. #4
    Redeemer
    Join Date
    Sep 2002
    Location
    Ireland
    Posts
    1,143

    Default

    If you look carefully, you see that all of that code is encased within comment brackets:

    Code:
    /*
    
    
    
    
    
    @todo ronp - enhance config functionality.
    /**
     * Saves the current value for all configurable properties in this object to the .ini file.  The values for any global config
     * properties will be propagated to all child classes.
     *
     * @param	bRefreshInstances	if TRUE, all instances of this class will re-load the values for their configurable properties
     *								from the .ini.  THIS WILL CLOBBER ANY EXISTING VALUES!
     * @param	PropertyName		if specified, only this property's value will be saved.
     */
    native(536) final function SaveConfig( optional bool bRefreshInstances, optional string PropertyName );
    
    /**
     * Saves the default values for all configurable properties in this object's class to the .ini file.  The values for any global config
     * properties will be propagated to all child classes.
     *
     * @param	bRefreshInstances	if TRUE, all instances of this class will re-load the values for their configurable properties
     *								from the .ini.  THIS WILL CLOBBER ANY EXISTING VALUES!
     * @param	PropertyName		if specified, only this property's value will be saved.
     */
    native static final function StaticSaveConfig( optional bool bRefreshInstances, optional string PropertyName );
    
    /**
     * Resets the values for configurable properties in this object's class back to the values in the corresponding Default*.ini file.
     *
     * @param	bRefreshInstances	if TRUE, all instances of this class will re-load the values for their configurable properties
     *								from the .ini.  THIS WILL CLOBBER ANY EXISTING VALUES!
     * @param	PropertyName		if specified, only this property's value will be reset.
     */
    native static final function ResetConfig( optional bool bRefreshInstances, optional string PropertyName );
    
    /**
     * Removes the values for all configurable properties in this object's class from the .ini file.
     *
     * @param	PropertyName		if specified, only this property's value will be removed.
     */
    native(537) final function ClearConfig( optional string PropertyName );
    
    /**
     * Removes the values for all configurable properties in this object's class from the .ini file.
     *
     * @param	PropertyName		if specified, only this property's value will be removed.
     */
    native static final function StaticClearConfig( optional string PropertyName );
    
    
    
    
    
    */
    So there does not appear to be any ClearConfig or ResetConfig function, they will probably be added in a future patch(?).

  5. #5
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    Oh dear, you're right. My text editor, which uses colour coding, didn't show the whole section as the one block colour for comments - only the internal ones.

    This is shocking. These are core functions.

    If there was one way to deal death to my mod then this is it.

    I sincerely hope this gets fixed. I'm just shocked.

  6. #6
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    I've unfortunately just had to put my mod on hold for UT3 because this basic feature is missing from the Object Class - as well as lack of true generic support for multi-columned lists due to over use of native code.

    It is a sad day for me and the users of my mod who were hoping for a UT3 version.

    http://mapmixer.oceaniaut.com

  7. #7
    MSgt. Shooter Person
    Join Date
    Jan 2007
    Posts
    397

    Default

    Quote Originally Posted by Shambler View Post
    If you look carefully, you see that all of that code is encased within comment brackets:

    Code:
    /**
     * Resets the values for configurable properties in this object's class back to the values in the corresponding Default*.ini file.
     *
     * @param	bRefreshInstances	if TRUE, all instances of this class will re-load the values for their configurable properties
     *								from the .ini.  THIS WILL CLOBBER ANY EXISTING VALUES!
     * @param	PropertyName		if specified, only this property's value will be reset.
     */<< -- End Comment Section
    native static final function ResetConfig( optional bool bRefreshInstances, optional string PropertyName ); << -- Not In Comment Section
    
    /** << -- Open Comment Section
     * Removes the values for all configurable properties in this object's class from the .ini file.
     *
     * @param	PropertyName		if specified, only this property's value will be removed.
     */ << -- End Comment Section
    native(537) final function ClearConfig( optional string PropertyName ); << -- Not In Comment Section
    
    /** << -- Open Comment Section
     * Removes the values for all configurable properties in this object's class from the .ini file.
     *
     * @param	PropertyName		if specified, only this property's value will be removed.
     */
    So there does not appear to be any ClearConfig or ResetConfig function, they will probably be added in a future patch(?).
    check again, they are not commented out. follow the open and close of the comments. you cant open a new comment inside an open comment section. so the second open in your code clipping is voided and is itself commented out and closed by the first comment close. Otherwise SaveConfig would be commented out but that does work.
    Mod: Renegade X (CNC Renegade Mod) | Unreal Script Coder
    UDK Project: Uncertainty RPG | Youtube Channel

  8. #8
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    Regardless of whether they are commented out or not it doesn't work (ie compile). That's what concerns me.

  9. #9

    Default

    remove the comments and try it again not sure if it will work but maybe that floating multi line comment on line 1398 is holding up the compile

  10. #10
    MSgt. Shooter Person
    Join Date
    Jan 2007
    Posts
    397

    Default

    you try StaticClearConfig or StaticResetConfig? since my mutators are using StaticSaveConfig and I am assuming the SaveConfig doesn't work that is why they use StaticSaveConfig. maybe it is the same with ClearConfig and ResetConfig.
    Mod: Renegade X (CNC Renegade Mod) | Unreal Script Coder
    UDK Project: Uncertainty RPG | Youtube Channel

  11. #11

    Default

    Quote Originally Posted by sinx View Post
    I even tried to use the Static version and it complained as well.

    "Error, Unrecognized member 'ClearConfig' in class 'MyClass'"
    I think he already has

  12. #12
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    SaveConfig() and StaticSaveConfig() produce no compile errors.

    ClearConfig() and StaticClearConfig() produce unrecognised member compile errors, so currently there is no way to permanently remove a class (ie PerObjectConfig) section from an ini file.

    ResetConfig() is not a function I need to use at this stage.

  13. #13
    Redeemer
    Join Date
    Sep 2002
    Location
    Ireland
    Posts
    1,143

    Default

    Quote Originally Posted by warlord57 View Post
    check again, they are not commented out. follow the open and close of the comments. you cant open a new comment inside an open comment section. so the second open in your code clipping is voided and is itself commented out and closed by the first comment close. Otherwise SaveConfig would be commented out but that does work.
    SaveConfig is defined up above before the commented code:
    Code:
    //
    // Configuration.
    //
    
    native(536) final function SaveConfig();
    native static final function StaticSaveConfig();
    
    /*
    @todo ronp - enhance config functionality.
    etc.
    It would be defined twice if the code I listed before was not commented

  14. #14
    MSgt. Shooter Person
    Join Date
    Jan 2007
    Posts
    397

    Default

    Quote Originally Posted by Shambler View Post
    SaveConfig is defined up above before the commented code:
    Code:
    //
    // Configuration.
    //
    
    native(536) final function SaveConfig();
    native static final function StaticSaveConfig();
    
    /*
    @todo ronp - enhance config functionality.
    etc.
    It would be defined twice if the code I listed before was not commented
    they must of changed how comments work then. when I followed the opening and closing comment lines I got it where the functions were not commented out. The comments should still be functioning the same as UT2004 as well as c++ but it appears something if different if you can comment out an entire section that has comment sections in it.
    Mod: Renegade X (CNC Renegade Mod) | Unreal Script Coder
    UDK Project: Uncertainty RPG | Youtube Channel

  15. #15
    Palace Guard

    Join Date
    Jun 2007
    Location
    Christchurch
    Posts
    3,515

    Default

    sinx, this won't completely kill your modification it just means that your users initialization file will get a little large over time. An approachable step at the moment is to just have a flag within PerObjectConfig which marks a config object bring invalid. This is not the best way to do it however and hopefully we will see those functions making a return.

    Another possible way to do this it to potentially null all variables within a config object and then save it. This may delete the config object, but I doubt it. I'd have to try it out myself.

    Luckily for what I was doing, removing config objects was not required.

  16. #16
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    Yes, indeed, my backup plan was to kill the contents of the class storage and when I need to do a GetPerObjectConfigSections(), I would then filter out the empty classes. However, this is not totally desirable in my case and tbh I'm not going to start working around something so incredibly basic that should have been there in the first place.

    But yeah, thanks for the feedback in any case.

  17. #17
    Iron Guard
    Join Date
    Sep 2007
    Location
    Adelaide, South Australia
    Posts
    550

    Default

    I'd really appreciate some feedback from someone at Epic on this issue.

    Thanks


    Checked your log file?



 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.