ledger.set
Sostituisce un valore salvato su un elemento.
Firma
ledger.set(ref: ElementRef, key: string, value: AbiValue): void
Parametri
| Nome | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
ref | ElementRef | Obbligatorio | L'elemento su cui agisce, di solito self. |
key | string | Obbligatorio | Il nome del valore salvato. |
value | AbiValue | Obbligatorio | Il valore da salvare. |
Restituisce
void Niente.
Esempio
ledger.set(self, "hp", math.min(max_hp, hp + amount));
