Announcement

Collapse
No announcement yet.

UObject::SaveConfig() question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UObject::SaveConfig() question

    Hey there,

    i am having troubles saving in a custom .ini file via SaveConfig()

    The problem i have is, that i cant use
    Code:
     FPath::GameSavedDir()
    and then route to the appropriate file based from this.

    when i say

    Code:
    ...->SaveConfig(16384Ui64, L"absolute Path")
    it is working
    but when i try to make a stringPath consist of "GameSavedDir+route to my ini-file"

    i cant use it like this:

    Code:
    SaveConfig(16384Ui64, myString)   or    SaveConfig(16384Ui64, TEXT(myString))     or SaveConfig(16384Ui64, TEXT("%s", myString))
    TEXT macro do not like any variables, and the first option is complaining the "L"-word is undefined. How am i able to convert my string to TChar* ?

    Thanks for any help
    Live long and prosper.

    #2
    You need to use the * operator to convert an FString to a TCHAR pointer. This should work:
    Code:
    SaveConfig(..., *myString)

    Comment


      #3
      Omg, thank you so much.

      To miss something that simple...
      Live long and prosper.

      Comment

      Working...
      X