Set the value of a variable from an ASCII character string.
Declaration | Zeolite.h |
---|---|
Implementation | Zeolite.cpp |
bool zvar_SetValueText(ZVAR hVar, const char* lpValueText);
Name | Type | Comment |
---|---|---|
hVar | ZVAR | A ZVAR variable handle whose value is to be set. |
lpValueText | const char* | A handle to a C-style string containing the value (as text) to which the variable will be set. |
False if an error occurred, and true otherwise.
Note that the variable referenced by hVar bust be initialised as one of the following types:
VarID | Example string |
---|---|
VarID_bool | “true”, “1”, “false”, “0” |
VarID_char | “c” |
VarID_byte | “255” |
VarID_ubyte | as above |
VarID_sbyte | ”-128” |
VarID_short | ”-32768” |
VarID_ushort | “65535” |
VarID_int | “1” |
VarID_uint | “1” |
VarID_int64 | “1” |
VarID_float | “1.0” |
VarID_double | “1.0” |
VarID_string | “Hello world” |
VarID_colour | “255, 255, 255” |
VarID_vector3c | “0, 1, 2” |
VarID_vector3i | “0, 1, 2” |
VarID_vector3f | “0.0, 1.0, 2.0” |
VarID_vector3d | “0.0, 1.0, 2.0” |
atof
function.