Table initializer not working

Create issue
Issue #12 resolved
mezzodrinker created an issue

Creating a table with values is not possible. You can use the following statement as a workaround, but you should be able to use the second code example.


$table[1] = "foo";
$table[2] = "bar";

Table initializer

$table = {
  [1] = "foo",
  [2] = "bar"

With the second code example, the parser throws the following error:

[Warning] [MobTalker2] The interaction script threw an error: expected function, got nil (at line: <line of first table element>).

Comments (3)

  1. Log in to comment