save_new | Precisamento

save_new

Home
functions
constants
json
examples

Creates a new instance, and returns its id.

Syntax

1
save_new(type_name, argument_count)
Argument Type Description
type_name string The name of the type to create.
argument_count double The number of loaded arguments used to construct the instance.

Returns: Instance Id

Description

This function will create a new object of the specified type. First, load the arguments that will be passed to the constructor, then call this function. It will grab the arguments and use their types to determine which contructor to call. Finally, this returns an id that can be used to reference the instance in further operations.