L3DT documentation
Large 3D terrain generator



Copy the value of one variable to another.


Declaration Zeolite.h
Implementation Zeolite.cpp

Function prototype

bool zvar_CopyValue(ZVAR hVarDest, ZVAR hVarSrc);


Name Type Comment
hVarDest ZVAR A ZVAR handle to the destination variable, the value of which will be overwritten.
vVarSrc ZVAR A ZVAR handle to the source variable, the value of which will overwrite the value of hVarDest.

Return value

False if:

  • Either the source or destination variables are invalid handles.
  • The source variable is not initialised.
  • The variable type cannot be copied (see below).

True otherwise.


Function will re-initialise hVarDest if required

If hVarDest is not of the same variable type as hVarSrc, it will automatically be re-initialised as the correct type.

Function does not copy name

The name of the variable is not changed by zvar_CopyValue.

Incompatible types

The following variable types cannot be copied by zvar_CopyValue:

Type Reason
VarID_void Voids contain no data, and hence no value to copy.
VarID_map Maps are potentially too big to create multiple copies*.
VarID_ProgBox No copy operator is defined for progress dialogs*.
VarID_ZeoFunc No copy operator is defined for Zeolite extension functions*.

* If you want to create a variable that can be used to access another variable of one of these types, use zvar_SetVarRef instead.

zeolite/functions/zvar_copyvalue.txt · Last modified: 2017/08/31 05:26 (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