Page 1 of 1
About setting variables (client side)
Posted: Fri Jan 17, 2014 5:43 pm UTC
by icaro440
Hi again. I have another problem with the client.
I have this code that I always used to change my joystick configuration (and please do not ask me about; "why would you use a fxxxxng joystick? "
)
The code has always worked in previous versions of Unvanquished, but no longer works.
Specifically, i want to set the var "nextjoy" to "vstr joy2", but i can`t...instead nextjoy is set to "vstr"
this is the code:
set joy1 "exec configuracion/controles/joystick/eligejoy.cfg; set nextjoy vstr joy2"

I guess what you're thinking and no,
this other code does not work
set joy1 "exec configuracion/controles/joystick/eligejoy.cfg; set nextjoy "vstr joy2""
Any idea???
Re: About setting variables (client side)
Posted: Fri Jan 17, 2014 6:19 pm UTC
by kangz
I'm pretty sure that the following works
Code: Select all
set joy1 "exec configuracion/controles/joystick/eligejoy.cfg; set nextjoy \"vstr joy2\""
Basically since the engine-upgrade merge /set takes only one "word" as the value to give to the cvar, where the word can be a quoted string. We are discussing it on IRC, I'll keep you posted.
EDIT:
So it seems we want to have "/set a foo bar" set a to "foo bar", I'll fix it soon. (however if you do /set a foo<space><space>bar it will do "foo<space>bar", to preserve the two spaces you'll need quotes)
Re: About setting variables (client side)
Posted: Fri Jan 17, 2014 7:59 pm UTC
by icaro440
Thank you guys! 
Re: About setting variables (client side)
Posted: Fri Jan 17, 2014 8:11 pm UTC
by Forty-Two
You could also exec a .cfg to bypass the whole thing with quotation marks, which works, though it's ugly..what Viech said is a lot neater. But that's what I've been using with TF2, as you can't \" there. For what it's worth.
Re: About setting variables (client side)
Posted: Sat Jan 18, 2014 4:54 pm UTC
by kangz
Should be fixed with c0a8d275d