Skip to content

__SetValues

ObjectType? __SetValues(String id, Array<ObjectType> values)
ObjectType? __SetValues(Entity(Base)? entity, Array<ObjectType> values)

Builtins · internal core builtin · accessible from Bootstrap only

Overloads

ObjectType? __SetValues(String id, Array<ObjectType> values)

Replaces the Values of the entity with the given id.

Parameters

  • String id — The id of the entity.
  • Array<ObjectType> values — The new Values.

Returns

ObjectType? — The new Values of the entity, or null if the entity does not exist.

Errors

A runtime error if a dynamic entity would become a Value of a non-dynamic entity. A runtime type error if id is not a String, or values is not an Array.

ObjectType? __SetValues(Entity(Base)? entity, Array<ObjectType> values)

Replaces the Values of the given entity.

Parameters

  • Entity(Base)? entity — The entity to set the Values of.
  • Array<ObjectType> values — The new Values.

Returns

ObjectType? — The new Values of the entity, or null if entity is null.

Errors

A runtime error if a dynamic entity would become a Value of a non-dynamic entity. A runtime type error if entity is not an Entity, or values is not an Array.

See Also