ledger.set
Substitui um valor salvo em um elemento.
Assinatura
ledger.set(ref: ElementRef, key: string, value: AbiValue): void
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
ref | ElementRef | Obrigatório | O elemento em que atua, normalmente self. |
key | string | Obrigatório | O nome do valor salvo. |
value | AbiValue | Obrigatório | O valor a salvar. |
Retorna
void Nada.
Exemplo
ledger.set(self, "hp", math.min(max_hp, hp + amount));
