[DiscordArchive] How do I backwards for loop .lua table?
[DiscordArchive] How do I backwards for loop .lua table?
Archived author: Thulz • Posted: 2023-09-22T14:41:40.872000+00:00
Original source
How do I backwards for loop .lua table?
Archived author: Thulz • Posted: 2023-09-22T14:42:15.539000+00:00
Original source
using `for i, v in pairs (table) do` currently
Archived author: robinsch • Posted: 2023-09-22T14:42:28.906000+00:00
Original source
I can only tell you how it works client side, if a spell has `SPELL_ATTR4_AUTO_RANGED_COMBAT` it gets set to client auto combat spell, if you have cvar `autoRangedCombat` enabled it will check if you are out of melee range and then it will toggle the auto combat spell if you are within range.
Archived author: Thulz • Posted: 2023-09-22T14:46:31.381000+00:00
Original source
`for i = #table, 1, -1 do` Went for this way, if anyone knows a better way lemme know
Archived author: stoneharry • Posted: 2023-09-22T14:49:33.536000+00:00
Original source
That is fine
Archived author: Foe • Posted: 2023-09-22T18:10:40.683000+00:00
Original source
Just keep in mind that #table doesn't work properly if your table doesn't have integer keys, or if the integer keys have holes
![[Image: image.png?ex=690c3c38&is=690aeab8&hm=5ab...37ae98137&]](https://cdn.discordapp.com/attachments/415944535718494208/1154842585249099796/image.png?ex=690c3c38&is=690aeab8&hm=5ab54c0d63b08df48e1830c9af39284b185efc40242e4448f3e6ab437ae98137&)
Archived author: Foe • Posted: 2023-09-22T18:12:08.312000+00:00
Original source
![[Image: image.png?ex=690c3c38&is=690aeab8&hm=5ab...37ae98137&]](https://cdn.discordapp.com/attachments/415944535718494208/1154842585249099796/image.png?ex=690c3c38&is=690aeab8&hm=5ab54c0d63b08df48e1830c9af39284b185efc40242e4448f3e6ab437ae98137&)
Archived author: Foe • Posted: 2023-09-22T18:12:25.829000+00:00
Original source
#JustLuaThings
Archived author: Thulz • Posted: 2023-09-22T18:25:08.237000+00:00
Original source
Cool appreciate
Archived author: Thulz • Posted: 2023-09-22T18:26:00.669000+00:00
Original source
Table is been ordered & filled by table.insert asc pos from 1 to x