Skip to content

Instantly share code, notes, and snippets.

@dicene
Created July 9, 2019 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dicene/cc13d338a7a80895a60be5288e4109b0 to your computer and use it in GitHub Desktop.
Save dicene/cc13d338a7a80895a60be5288e4109b0 to your computer and use it in GitHub Desktop.
Lua Test
inv = {"item1", "item2"}
inv.pack = {"packitem1", "packitem2"}
backpack = inv.pack
echo("Inv:")
display(inv)
echo("Pack:")
display(inv.pack)
echo("Backpack:")
display(backpack)
table.insert(backpack, "another backpack item")
echo("Inv:")
display(inv)
echo("Pack:")
display(inv.pack)
echo("Backpack:")
display(backpack)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment