Urban Terror Forums: Whats wrong with my script? - 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

Whats wrong with my script? Rate Topic: -----

#1 User is offline   monstro Icon

  • Account: monstro
  • Country:
  • Joined: 15-December 11
  • Posts: 32

Posted 31 March 2023 - 05:46 PM


seta set1 "seta load vstr set2; gear FLAOWUA; ut_echo SELECTED LR300 MODE"
seta set2 "seta load vstr set3; gear FeAOWVA; ut_echo SELECTED M4 MODE"
seta set3 "seta load vstr set1; gear FMAAWUX; ut_echo SELECTED G36 MODE"

seta load "vstr set1" // Default

bind F11 "vstr load"



When I press F11, it stays on set1 and doesnt switch to another set.

#2 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 31 March 2023 - 05:57 PM

It might be one of those cases where the script engine swallows commands. try the order ut_echo; gear; set.
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#3 User is offline   monstro Icon

  • Account: monstro
  • Country:
  • Joined: 15-December 11
  • Posts: 32

Posted 31 March 2023 - 06:04 PM

View PostIye, on 31 March 2023 - 05:57 PM, said:

It might be one of those cases where the script engine swallows commands. try the order ut_echo; gear; set.


The same, doesnt switch.
Prints "SELECTED LR300 MODE" but doesnt go any further.

#4 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 31 March 2023 - 06:15 PM

Appearently seta doesnt work in there. Use set instead.
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#5 User is offline   monstro Icon

  • Account: monstro
  • Country:
  • Joined: 15-December 11
  • Posts: 32

Posted 31 March 2023 - 06:21 PM

View PostIye, on 31 March 2023 - 06:15 PM, said:

Appearently seta doesnt work in there. Use set instead.


Yes! You were right. Thanks.

bullet_loaderAdvertisement

#6 User is offline   Nexu Icon

  •   clan leader   
  • Account: nexu
  • Main tag: |it|
  • Country:
  • Joined: 26-June 07
  • Posts: 4,265

Posted 03 June 2023 - 11:50 AM

View Postmonstro, on 31 March 2023 - 06:21 PM, said:

Yes! You were right. Thanks.

Don't use seta in a script unless you really need that variable that you are setting to be remembered and stored in the q3config.cfg.

The a behind set is to flag the cvar to be archived.

#7 User is offline   Marcoperson250 Icon

Posted 01 January 2024 - 12:13 PM

Your script appears to have a cyclic dependency issue. The seta load line sets a cyclic reference to vstr set1, creating an infinite loop. To resolve this, modify the set commands to eliminate the cycle, ensuring each set command ends with the next set in the sequence. This prevents an infinite loop and allows proper execution of your script.

seta set1 "seta load vstr set2; gear FLAOWUA; ut_echo SELECTED LR300 MODE"
seta set2 "seta load vstr set3; gear FeAOWVA; ut_echo SELECTED M4 MODE"
seta set3 "seta load vstr set1; gear FMAAWUX; ut_echo SELECTED G36 MODE"

seta load "vstr set1" // Default

bind F11 "vstr load"

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

Advertisement


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