I have got a Table that looks something like that:
local ChooseFrom = { S = 23; H = 50; A = 90; V = 158; Ai = 256; G = 358; K = 469; L = 611; O = 756; F = 1000;
} but instead of rinting it this way its printed like that:
H50 L611 G358 V158 F1000 O756 A90 K469 S23 Ai256
Why does this occure and how can i make it get printed out in the order its meant to get printed?
Dictionaries have no order, if the order is important you should use an array instead.
Dictionaries have no order as they are stored as Hash Maps and as such there is no order in their algorithm. This is expected behaviour.
As previously said dictionaries have no order. Luckily arrays do! You can get the order by using the ipairs() to cycle through based on index number!
This should work:
— Put the table up here for i, v in pairs(ChooseFrom) do print(v) end