|
Valkenar Beginner
Joined: 12 Aug 2009 Posts: 15
|
Posted: Fri Apr 30, 2010 7:13 pm
Storing Lua tables with embedded pipes [CMud Pro 3.16b] |
CMud seems get confused if you have pipes in strings inside lua tables that you try to store in cmud variables
A lua table like
{"a|b","b|c"}
gets translated into
{{"a", "b"}, {"b", "c"}}
Here's some sample code:
Code: |
<alias name="tester" language="Lua" id="28">
<value>test = {"a|b","b|c"}
print('Correct:')
print(test)
zs.var.name = test
test = zs.var.name
print('Actual Result:')
print(test)
</value>
</alias>
|
Run the alias "tester" twice and you'll see the line that it should be followed by what it becomes after cmud translates it to and from a cmud variable. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Apr 30, 2010 8:03 pm |
That is correct. CMUD uses the a|b|c syntax for tables and it is converting Lua tables into CMUD string list tables and visa-versa. No way around this unfortunately at this time.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|