ScriptSpot

Forum topic · General Scripting

array string back to Array

By JokerMartini · 2011-10-11

Description

For example I have and array as a string

"#("con_Jim", "con_Jim2", "con_Jim3")"

Whats the best way to convert that back an an actual array?

#("con_Jim", "con_Jim2", "con_Jim3"

Comments (3)

JokerMartini · 2011-10-13

That is what I ended up doing. I wasn't sure if there was a better or other way of doing it. I figured any other way would be more complicated.

execute(str)

Anubis · 2011-10-11

str = #("MAX","Script","is","dead","funky") as string
--"#("MAX", "Script", "is", "dead", "funky")"
arr = execute str
--#("MAX", "Script", "is", "dead", "funky")

dmi3iy · 2017-07-27

Thank you very much!