Get raw LUA Code from a Table Value after Loaded in #464
Unanswered
Serverfrog
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
i have a Lua File, which just contains a single Variable with multiple Tables inside,
something like
But much much bigger in size.
Now i already have it implemented (with stripping away the first assignment), to load the entire TableStructur into Rust.
But what i also need to do, is to Save a Specific Sub Segment of that Table Structur (in the example for example, "ValB") seperatly into its own little LUA Segments.
That should be made possible so i can backup single Segments of it (imagine a Tool which saves its configuration inside a LUA File, and the ones i want to backup alone are Modules that are configured with their own LUA Code inside them as String).
Is this possible or do i need to implement every field with serde to have the possibilities to save them them alone and to reapply them.
For example that i have then "ValBA" and "VALBB" saved. And then i want to write that entire LUA File again, (out of rust, via some kind of Import from somewhere), but then just "VALBB" and the rest of the LUA Structur is kept the same.
The easiest way i could think of, would be to just save the combination of the key and the entire Value as a String (which is then LUA), which i could then write also as such
Beta Was this translation helpful? Give feedback.
All reactions