CStats:new


The new method creates an instance of the CStats class. Note that the object can also be created using new_stats.

Note: This method's name uses all lower case to present it as the analog of the C++ new operator. Generally, the names of class methods begin with an uppercase letter but new and delete are different.

Syntax

S = CStats:new()

bullet.gif    S is returned as a new CStats object.

bullet.gif    On failure, nil is returned.

Example

S = CStats:new()

-- create a new instance of S of the CStats class.

  ...

-- other uses of the class go here, between new and delete.

S:delete()

-- deletes the object and its associated memory.

Related Topics

CStats class, delete, new_stats


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.