odd_create_value

Syntax

odd_create_value(type, value)

Parameters

Name Description
type The odd_type the Value represents.
value The GameMaker value the Value holds.

Returns

Value: The reference to the new Value. There is no need to free or delete it, because of how it is handled internally.

Description

This function creates a new Value, initializing it with the given parameters.

Attention

Do not attempt to access the data of a Value directly, instead use odd_value_type and odd_value_val.

Example

var value = odd_create_value(odd_type_int32, 21);

// . . .

This would create a new Value with the type of odd_type_int32 and the value of 21.