Greets everyone.
I was wondering if anyone knew of a way to cycle through a lua table starting with the last element and then proceeding down to the first.
The reason I ask is I am creating a table using "GetCommandList" and cycling through it using a for .. in .. do loop. However this creates a situation where the it starts with the most recent command, the next most recent etc. I want it to start with the least recent, the next least recent and so on.
Does anyone have an idea of how to do this. I'm imagining this will be pretty simple, but it escapes me right now.
I was wondering if anyone knew of a way to cycle through a lua table starting with the last element and then proceeding down to the first.
The reason I ask is I am creating a table using "GetCommandList" and cycling through it using a for .. in .. do loop. However this creates a situation where the it starts with the most recent command, the next most recent etc. I want it to start with the least recent, the next least recent and so on.
Does anyone have an idea of how to do this. I'm imagining this will be pretty simple, but it escapes me right now.