GetClassDerivationLevel(string)
Description
Section titled “Description”The GetClassDerivationLevel Lua function returns an integer indicating the derivation level index for a class based on a class name.
Arguments
Section titled “Arguments”- String:
This string needs to be the name of a class.
Return
Section titled “Return”- Integer:
The returned integer indicates the class derivation level.
Example
Section titled “Example”This example prints the index integer for the Pool class in the Command Line History:
| Copy CodeLua |
| ``` |
| return function() |
-- Get the index integer for the "Pool" class.local classDerivationLevel = GetClassDerivationLevel("Pool")-- Create a valid Printf return.if classDerivationLevel == nil then Printf("The return is nil")else Printf("The ClassDerivationLevel index for 'Pool' is: %i", classDerivationLevel)endend