2 Replies Latest reply on Apr 22, 2006 5:01 PM by M4rkeh


    M4rkeh Level 1
      Hi, I'm, using getpref and setpref to save and retrieve nested linear lists. The setpref seems to work ok, because I can find the text file and it contains the information it should. However when the movie restarted it doesnt reload the file. Can someone please take a look at the lingo and tell me whats wrong?

      on startmovie

      ghighscoreslist = getPref("topscores.txt")

      if voidp(ghighscoreslist) then

      set ghighscoreslist = []

      end if

      on exitframe
      go to the frame
      setPref("topscores.txt", string(ghighscoreslist))

      *variables have been declared

        • 1. Re: GetPref
          Level 7
          On Sat, 22 Apr 2006 21:27:24 GMT, M4rkeh posted in macromedia.director.lingo:

          > ghighscoreslist = getPref("topscores.txt")

          Try changing the above to

          ghighscoreslist = value(getPref("topscores.txt"))

          (Need to convert the string back into a list)

          I can't see the code you used to initialize the list (Web forum crapping on
          newsserver), but if it is a property list and if there are any VOIDs in the
          list, value() won't help.

          If this is for a projector, I recommend using the vList or propSave Xtras
          instead. They are both free for this particular feature. Especially if the
          projector will be running from a non-writable medium such as a CD.

          Mark A. Boyd
          • 2. Re: GetPref
            M4rkeh Level 1
            thanks v much it seems to be working well now