Skip to content

GetClassDerivationLevel(string)

The GetClassDerivationLevel Lua function returns an integer indicating the derivation level index for a class based on a class name.

  • String:
    This string needs to be the name of a class.
  • Integer:
    The returned integer indicates the class derivation level.

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)
end

end