a = {x=10, y=25} b = a b.x = 99 print(a.x) |
This prints 99
but I assumed it would print 10
.
I wrote code with a start table. Then I set a position table equal to the start table. I was hoping to update the position table but reset the position back to the start point at any time I wanted. I tested this out in php to make sure I wasn't crazy and it worked like I expected. I tried it out in strict Lua but it gave the result above. Why does Lua change the a
table when I only changed the b
? How do I deal with this?
In pico-8, when I want to reuse a sprite sheet for a new cart, I would just
copy/paste all the gfx and map data at the end of the file. It's not so simple
in Picotron.
How do I start a new cart in Picotron with an existing sprite sheet and map?
Mate-in-2 Volume 2. 33 more puzzles. White to move.
33 mate-in-2 puzzles. White to move. Will release more volumes.