How to save a global variable/array?

Discussion in 'Learning Ruby and RGSSx' started by J_C, Feb 12, 2017.

  1. J_C

    J_C Veteran Veteran

    Messages:
    192
    Likes Received:
    45
    First Language:
    Hungarian
    Primarily Uses:
    N/A
    Hello!

    I'm trying to put together a very basic script which stores numbers in an array. And during the game, I add and remove elements from this array. What I can't do is to make the game remember the actual content of the array if I save and exit the game.

    Can anyone help me in this?
     
    Last edited: Feb 12, 2017
    #1
  2. Linard

    Linard Veteran Veteran

    Messages:
    202
    Likes Received:
    17
    First Language:
    Filipino
    Primarily Uses:
    RMMV
    You can create the array you made in the Function Game_System, so everything will be save once you exit and load the game.
     
    #2
    Zeriab likes this.
  3. J_C

    J_C Veteran Veteran

    Messages:
    192
    Likes Received:
    45
    First Language:
    Hungarian
    Primarily Uses:
    N/A
    Got it.

    Just one thing. I have no idea how to do this. :D

    Edit: Hey, I got it afterall. :)
     
    Last edited: Feb 13, 2017
    #3

Share This Page