How To Export gd variable to C++ function?

i use a gd::Variable &ilvl = scene.GetVariables().Get(“lvl”); and have a variable ilvl, but i cant use it like integer or float or something. how to make it possible? int X = static_cast(ilvl) didn’t work.
I need to make gd::Variable a integer.

Official API documentation for the gd::Variable class : 4ian.github.io/GD-Documentation/ … iable.html

I dont understand without some examples. But i cant use “double lvl = gd::Variable::GetValue(“lvl”);”

Learn C++ before trying to do anything with the C++ API of GDevelop.
In your case, it would be :

scene.GetVariables().Get("lvl").GetValue()

I just dont understand structure of this engine, containers and all of it, because documentation is very strange. But anyway, thanks you!

The documentation is just like all libraries documentation. What do you find strange ?