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.
- 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