Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Instantiating global config vars (Read 2829 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Instantiating global config vars

The topic says it all: how do I do it?

There isn't a single example in any of the SDK files, and near as I can tell, it's not as simple as just doing for instance config_var_string::g_set_value(...) on an unused name.

Instantiating global config vars

Reply #1
For a string variable:
Code: [Select]
static config_var_string_i foo("var_name","initial_value");

Use class config_var_int_i for integers.

edit: forgot the semicolon