L3DT documentation
Large 3D terrain generator



Create a named variable that may be accessed by other plugins, scripts, etc.


Declaration Zeolite.h
Implementation Zeolite.cpp

Function prototype

ZVAR zvar_CreateShared(long VarID, const char* lpVarName);


Name Type Comment
VarID long The type ID of the variable to be created.
lpVarName const char* A pointer to a C-style string containing the name of the variable to be created (null if to be unnamed).

Return value

Null if an error occurred, and a non-null ZVAR handle otherwise.


Please refer to the comments for zvar_Create, which are relevant to this function also.

Nested lists

If the given lpVarName contains the '.' (dot) character, the variable will be created in a nested list. For instance, and lpVarName of “list1.list2.varname” will create the variable varname in a list called list2, which itself is contained in list1. In this example, list1 and list2 will be automatically created if they do not already exist. If list1 or list2 do exist but are not initialised as something other than VarID_varlist, var_CreateShared will return false and error will be thrown.

Shared/private access

Variables created by zvar_CreateShared are placed into a shared memory space that can be accessed by L3DT or other plugins using zvar_GetSharedVar. If you want to create a private variable accessible only to your plugin, use zvar_Create, and store the ZVAR in your plugin for later use (note zvar_GetSharedVar cannot retrieve a variable created with zvar_Create.)

zeolite/functions/zvar_createshared.txt · Last modified: 2017/08/31 06:16 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki