class Game_CommonVariables
def initialize
@data = {}
end
def [](id)
@data[id] == nil ? 0 : @data[id]
end
def []=(id, val)
@data[id] = val
filename = "CommonVar.rxdata"
file = File.open(filename, "wb")
Marshal.dump($game_common_variables, file)
file.close
end
end
class Game_CommonVariables
def initialize
@data = {}
end
def [](id)
@data[id] == nil ? 0 : @data[id]
end
def []=(id, val)
@data[id] = val
filename = "CommonVar.rxdata"
file = File.open(filename, "wb")
Marshal.dump($game_common_variables, file)
file.close
end
end