Urban Terror Forums: seta command not longer works - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

seta command not longer works Rate Topic: ***** 1 Votes

related to cfg files only

#1 User is offline   brutalboy Icon

  • Account: brutalboy
  • Joined: 19-September 12
  • Posts: 24

Posted 20 September 2012 - 02:36 PM

I have a lot of cfg complex cfg files that works on ut 4.1 but not on 4.2.
The problem is the "seta" command when is located inside to another command.
Try this test:

ut_echo "TEST: loading test commands..."
ut_echo "TEST: try to bind 's' key"
bind s "vstr testing"
ut_echo "TEST: 's' key should be binded"

ut_echo "TEST: 'set foo'..."
set foo "ut_echo I'm called from 'foo'"

ut_echo "TEST: 'set bar'..."
set bar "ut_echo I'm called from 'bar'"

ut_echo "TEST: 'seta testing'..."
seta testing "vstr foo; seta foo vstr bar; vstr foo; ut_echo I'm inside the 'seta testing'"

ut_echo "------------------------------------"
ut_echo "Test ready to run, press 's' to run."
ut_echo "------------------------------------"



When I run this is what happens:

TEST: loading test commands...
TEST: try to bind 's' key
TEST: 's' key should be binded
TEST: 'set foo'...
TEST: 'set bar'...
TEST: 'seta testing'...
------------------------------------
Test ready to run, press 's' to run.
------------------------------------
I'm called from 'foo'
usage: seta <variable> <value>
I'm called from 'foo'
I'm inside the 'seta testing'



So, if is there no way to use some things like quotes inside the double quotes or escape characters where is the solution? Is a 4.2 bug?

#2 User is offline   brutalboy Icon

  • Account: brutalboy
  • Joined: 19-September 12
  • Posts: 24

Posted 22 September 2012 - 01:05 AM

This is a bash one-liner for all who want to check if own scripts are affected from this bug(if is a bug).
First you have to execute your scripts(\exec myscript.cfg), so try to activate more possible functions or binds or whatever you have on scripts, then dump the console session on a file(\condump myconsole.log).
open a terminal and copy paste the one-liner:

echo -e "\n---\nUrban Terror 4.2 "seta" bug checker\n---\n"; echo -n "File to check: "; read input_file; console_file=$(eval "echo $input_file"); bug_string="usage: seta <variable> <value>"; bugs_counter=$(cat "${console_file}" | grep "${bug_string}" | wc -l); echo -e "---\n\n"; cat "${console_file}" | grep -C 1 "${bug_string}"; echo -e "\n\n---\nYou may have ${bugs_counter} bugs in your config\n---"


My urt installation put the dump on ~/.q3a/q3ut4/

This post has been edited by brutalboy: 22 September 2012 - 01:36 AM


#3 User is offline   brutalboy Icon

  • Account: brutalboy
  • Joined: 19-September 12
  • Posts: 24

Posted 23 September 2012 - 06:55 AM

The bug might be somewhere here or here?
Also the "setu" command have the same bug, both commands from script or console.

es.:
\set foo "echo foo"
\set bug "vstr foo; seta foo echo bar; vstr foo"
\vstr bug

output some like(not tested):
foo
usage: seta <variable> <value>
foo

other considerations:
Cvar_SetA_f, Cvar_SetU_f and Cvar_SetS_f are almost the same, so someone might have the bug on own server if "sets" command is affected too, I never used "sets" and never tryied to start a server, so if you have a server and you have doubts you might try the above one-liner and remember to replace:
bug_string="usage: seta <variable> <value>"
with
bug_string="usage: sets <variable> <value>"


*Edit: Yes, now I also tryied "sets" command from client(could be the same thing looking source) and is bugged too

This post has been edited by brutalboy: 23 September 2012 - 09:26 AM


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Sponsored link
https://www.frozensand.com/


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942