Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Config.ini script

  • #1, by nelsonc 11 years ago Zitieren
    Hi all,

    The script for reading and writing to config.ini as available here http://wiki.visionaire-tracker.net/wiki/Read/Write_Config.ini_(CMS) uses a variable localAppDir. Where is it defined ?
  • #2, by richard-gerum 11 years ago Zitieren
    I think it is autimatically defined by the engine, you can just use it. It referes to the directory your game files (savegames, message.log, and config.ini) are stored.
  • #3, by afrlme 11 years ago Zitieren
    Aye, the localAppDir is defined by the engine, sorry. You used to be able to include the config.ini file in your .ved root folder in 3.7.1 but since 4.x most things such as save games, log files & the config.ini are stored in a separate folder in c:/users/username/appdata/local/game-company-ved-name/ -- obviously not that exact path, but you get the idea.
  • #4, by nelsonc 11 years ago Zitieren
    Also, if company name not set, the config.ini file's folder is the game name.
  • #5, by nelsonc 11 years ago Zitieren
    I'm getting the following error message while launching the game by doing "Save and run":
    [string "readWriteConfig"]:92: attempt to index local 'fw' (a nil value)
    Any idea ?
  • #6, by nelsonc 11 years ago Zitieren
    Found it : had space and 'é' in my project name. File explorer doesn't like them.
  • #7, by nelsonc 11 years ago Zitieren
    There is a bug in the script file :
    for lines in io.lines(fn) do
    

    should be
      for lines in io.lines(localAppDir .. fn) do
    

  • #8, by nelsonc 11 years ago Zitieren
    I am now getting the error :

    12:28:07: [string "readWriteConfig"]:46: call to setValue on object  (eGame,-1) failed
    
  • #9, by afrlme 11 years ago Zitieren
    actually I believe it should probably be...
    for lines in io.lines(fr) do
    


    Typo mistake.
  • #10, by nelsonc 11 years ago Zitieren
    I think the lines function expects a filename. I'm getting the error :

    12:41:31: [string "readWriteConfig"]:41: bad argument #1 to 'lines' (string expected, got userdata)
    


    on that line now, reverting to

    for lines in io.lines(localAppDir .. fn) do
    

  • #11, by nelsonc 11 years ago Zitieren
    Still getting the error :

    12:44:47: [string "readWriteConfig"]:46: call to setValue on object  (eGame,-1) failed
    Line : 
     if line == "fullscreen = no" then wm:setValue(VConditionValue, false); print("window mode is currently set to Windowed") end