Yeah everyone was pointing at that "There's already table.insert function" and honestly saying I was unaware of that!! But I appreciate all those people who took the time to correct me. That's pretty cool. And note I accepted your contribution but made a little changes to that - once I realised that Lua tables are passed by reference I thought it'd be great if we had a table.copy which copies a table - simple yet sweet and I also added a table.reverse and a table.range function. And of course I removed all those table.push functions which were effectively just clones of table.insert as the community pointed out.Pyuu wrote: ↑Fri Jul 19, 2019 7:06 pm You might be interested in looking into the table.insert function. It already has provided functionality for things like table.push_front... and since it's a native function I believe it's written in C and not Lua (meaning it'll be faster? correct me if I'm wrong please!)
A stupid note: (can skip if you don't have time)
And one last thing I would like to point out that- I'm a beginner in Lua/Love2D (Beginner in the sense that although I have some like one and a half months experience - yet my knowledge is very limited and I think maybe by making more libraries and more games I can increase my Lua and Love2D skills. Keep correcting me whenever you feel the need - that would increase my rate of learning (which is currently not very high) and once I have mastered shaders - believe me A LOT OF AWESOME GAMES will be created and uploaded on the "Games and Creations" forums and of course you'd be credited (Special thanks to Chris H. that is) - well that's just how great and grateful I am
Sorry I kind of get carried away sometimes - but yeah thanks for your contribution!! I appreciate that