> Funzioni
Restituisce il tipo del valore valore, tra i tipi:
null.12, -0.15."ciao".[1, 2, 3].[a: 5, b: true].{a: 5, b: true}.class A { }.function() {}.In JavaScript, typeof value restituisce una stringa — "number", "string", "boolean", "function", "object", "undefined" — e non una costante numerica come typeOf in LeekScript. Due trappole classiche: typeof [] e typeof null valgono entrambi "object". Usate Array.isArray(value) per riconoscere un array, value === null per null, e instanceof per il resto: value instanceof Map, value instanceof Cell, value instanceof Entity.
In Python, type(value) restituisce la classe del valore e non una costante numerica come typeOf in LeekScript: type([]) vale `, e type(value).__name__ dà "list", "bool", "Cell"… Per verificare un tipo, scrivete sempre isinstance(value, list) piuttosto che type(value) is list: il motore avvolge list, dict, set, tuple e frozenset per contare le operazioni, cosicché type([]) is list vale False mentre isinstance([], list) vale True. isinstance accetta per giunta una tupla di tipi, isinstance(x, (int, float))`, e riconosce le sottoclassi.
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.