Export and import temporary text file.

BECOME PART OF THE COMMUNITY - Sign up here
  • Hi,
    I need to save a simple value or a word in a text file and then be able to retrieve this value when launching the plugin.

    On gma2 I used to create the file

    Code
    file = io.open("Z_VarLua.txt","w");
    file:write(nameGrp);
    io.close(file);

    I searched in the manual, I only found Import / export but unless I am mistaken rather intended for a table.

    If it is possible, do you know of a function that allows this?
    Thank you for your help

  • your example code is generic lua, not gma2 specific, however on gma3 you will need to include the full path of your file, e.g.

    local filepath = GetPath("gma3_library").."/Z_VarLua.txt"
    local file = io.open(filepath, "w")

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!