Custom variables in plugin
Posted: Sat Nov 22, 2014 9:18 am
I want to use custom variables like am_var1 but when I try next code I get an error:
server.cfg
code
error
How can I get my am_var1 variable?
server.cfg
Code: Select all
am_var1 "test_val"
code
Syntax: Select all
from cvars import cvar
def load():
print('%s' % cvar.find_var('am_var1').get_string())
error
Code: Select all
AttributeError: 'NoneType' object has no attribute 'get_string'
How can I get my am_var1 variable?