This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuPlugin error >> dlopen() 'plugins/vcmp-python-plugin-cpy36-linux6.so' failed: plugins/vcmp-python-plugin-cpy36-linux6.so: cannot open shared object file: No such file or directory
Failed to load plugin: vcmp-python-plugin-cpy36-linux6
QuoteGlobal variables are stored in a table called the root table. Usually in the global scope the environment object is the root table, but to explicitly access the closure root of the function from another scope, the slot name must be prefixed with '::' (::foo).
class test_class
{
function print1()
{
::print("print1");
}
function print2()
{
print("print2");
}
}
function global_print1()
{
::print("global_print1");
}
function global_print2()
{
print("global_print2");
}
global_print1();
global_print2();
local test = test_class();
test.print1();
test.print2();
This code outputs:[SCRIPT] global_print1
[SCRIPT] global_print2
[SCRIPT] print1
[SCRIPT] print2
class test_class
{
function print1()
{
::print("print1");
}
function print2()
{
print("print2");
}
function print(text)
{
::print("!!!" + text + "!!!");
}
}
function global_print1()
{
::print("global_print1");
}
function global_print2()
{
print("global_print2");
}
global_print1();
global_print2();
local test = test_class();
test.print1();
test.print2();
[SCRIPT] global_print1
[SCRIPT] global_print2
[SCRIPT] print1
[SCRIPT] !!!print2!!!
[autosaved]
0=CreateObject(123, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);
1=CreateObject(456, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);
CreateObject(123, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);
CreateObject(456, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);