[Fixed] server cfg parsing issue, v2.2
27. June 2011 - 8:30
hello, e+ devs.
here's the code that worked properly on v2.1:
modifyItem(0, "weapon_*", "", in($g_gametype, GT_CTF, GT_RTF, GT_1FCTF) ? 5 : ($g_gametype == GT_FFA ? 1 : $weaponrespawn));
for flag-related game types weapon respawn is 5 secs, for ffa - 1 sec, and the value specified in $weaponrespawn var is used for the rest gametypes (duel, tdm, etc.)
on v2.2 it gives the following error:
q3console wrote:
ERROR: in() expects at least 2 arguments in conf/cpma.cfg on line 167 column 35
Near: $g_gametype, GT_CTF, GT_RTF, GT_
cfg is attached.
27. June 2011 - 8:35
#1
Re: server cfg parsing issue, v2.2
u need to remove no_ramp variable from physics
and check syntax of modifyitem on default.cfg
27. June 2011 - 12:53
#3
Re: server cfg parsing issue, v2.2
Good catch, a mistake prevents nested function calls to work properly. As a workaround for the moment, just avoid them, split the line into some if-else or use a temporary variable to hold the respawn value.
i need to make some more changes than just removing no_ramp_jumps, ali. hardly it's related. besides, there's no modifyitem mentioned in default.cfg. you mean sample.cfg? nothing new there.