Hello tout le monde,
voici mon code pour l’exercice cité dans le titre.
Je reste ouvert à toutes suggestions pour améliorer ces quelques lignes.
local Perso = {
Id = {Name = "Argyle", Age = 28 .. " years"},
Stats = {Atk = "Attack level: ".. 25 .."/100", Def = "Defense level: ".. 12 .."/100", Mag = "Magic Level :".. 0 .."/100"},
Inventory = {Slot1 = "EMPTY SLOT", Slot2 = "Sword", Slot3 = "Shield", Slot4 = "Clé brisée", Slot5 = 7 .." Cailloux"}
}
print("CHARACTER: "..Perso.Id.Name.." / "..Perso.Id.Age)
print("STATS: "..Perso.Stats.Atk.." / "..Perso.Stats.Def.." / "..Perso.Stats.Mag)
print("INVENTORY: "..Perso.Inventory.Slot1.." / "..Perso.Inventory.Slot2.." / "..Perso.Inventory.Slot3.." / "..Perso.Inventory.Slot4.." / "..Perso.Inventory.Slot5)