ScriptSpot home

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

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.

Panayot Karabakalov

execute(str)

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