mapKeySet(map map) → set keys
This function is available from LeekScript 4 onward. Returns a new set containing the keys of the map map, in the order of the map.
Same as arrayToSet(mapKeys(map)), without the intermediate array. The set is a copy: modifying it does not modify the map.
var hp = [12: 500, 15: 320, 18: 0]
var ids = mapKeySet(hp)
debug(ids) // <12, 15, 18>
debug(15 in ids) // true
const hp = new Map([ [12, 500], [15, 320], [18, 0] ])
const ids = new Set(hp.keys())
Debug.log([...ids]) // [12, 15, 18]
hp = {12: 500, 15: 320, 18: 0}
ids = set(hp.keys())
Debug.log(sorted(ids)) # [12, 15, 18]
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.