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

Save game data

  • #40, by afrlme 12 years ago Zitieren
    1. you should not be declaring global variables unless you need them to be global. add local before variables to contain them to that particular script/function.

    2. I don't know why you declared it twice or why you bothered to create the variable to be honest as you ended up creating an additional 2 lines & variables for not much reason at all - well from my point of view as I tend to code compact. Less is more; or so some people say...
    print( Values["main_test"].String )
    Values["main_test"].String = "hello world"
    print( Values["main_test"].String )
    


    3. Why would it change in the .ved? The save files are what store changes made to the game, not the .ved or .vis file (in case of compiled game). Those files only contain the raw data which the engine uses to make the game work. So if you did that & saved the game, then quit the game & launched the game then loaded from that savegame or autosave (whichever you saved with) then tried printing the value of the string, it should return "hello world" but if you try printing the value from a new game then it would return "", nil or empty - or something along those lines.

    4. See this page, for more information on displayed texts.
  • #41, by minibigs 12 years ago Zitieren
    OK, I'm too tired ... thinking it through of course when the game is built, there will be no VED shipped with it hence your tactic of writing them out to the config.ini... I think I've finally got it straight, I'm not normally this dense, honest.

  • #42, by minibigs 12 years ago Zitieren
    See the point with a save file as well, it's coming together slowly
  • #43, by minibigs 12 years ago Zitieren
    I posted the remark about the config.ini before I saw your reply, I do understand it now, thanks.