Hello Fellas. Im right here at coding my lua save menu and have difficulties to get dynamically setting a values string working.
So i want to set the Value saveslot_X to a specific string where X is a number which is chosen before and saved to the value "selected_savestate".
The script:
local savestate = "saveslot_"..Values["selected_savestate"].Int
print(savestate)
Values[savestate].String = Values["key_input_text"].String
the print gives the correct output into the console.
The last line throws an error:
Error: Unknown data-field "String".The issue seems to be in the part left from the "=" which is "Values[savestate].String"
If i hardcode the savestate into saveslot_3 for example everything works...
Values["saveslot_3"].String = Values["key_input_text"].String
any ideas?