Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Error in .cfg  (Read 1855 times)

0 Members and 1 Guest are viewing this topic.

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
[SOLVED] Error in .cfg
« on: March 02, 2015, 02:57:26 PM »
So I'm working on a small script, but for some reason the viewmodel_u variable stays at -0.89 when I stop moving (it's supposed to go back to 0)

I don't see anything what's wrong with the code, any ideas?

Code: [Select]
alias +walklower "+forward; viewmodel_u -0.02; wait 2; viewmodel_u -0.04; wait 2; viewmodel_u -0.06; wait 2; viewmodel_u -0.09; wait 2; viewmodel_u -0.12; wait 2; viewmodel_u -0.15; wait 2; viewmodel_u -0.19; wait 2; viewmodel_u -0.23; wait 2; viewmodel_u -0.27; wait 2; viewmodel_u -0.31; wait 2; viewmodel_u -0.35; wait 2; viewmodel_u -0.39; wait 2; viewmodel_u -0.43; wait 2; viewmodel_u -0.47; wait 2; viewmodel_u -0.51; wait 2; viewmodel_u -0.55; wait 2; viewmodel_u -0.59; wait 2;
viewmodel_u -0.63; wait 2; viewmodel_u -0.67; wait 2; viewmodel_u -0.71; wait 2; viewmodel_u -0.75; wait 2; viewmodel_u -0.79; wait 2; viewmodel_u -0.83; wait 2; viewmodel_u -0.87; wait 2; viewmodel_u -0.91; wait 2; viewmodel_u -0.95; wait 2; viewmodel_u -0.99; wait 2; viewmodel_u -1.03; wait 2; viewmodel_u -1.07; wait 2;
viewmodel_u -1.11; wait 2; viewmodel_u -1.15; wait 2;
viewmodel_u -1.19; wait 2; viewmodel_u -1.23; wait 2; viewmodel_u -1.27; wait 2; viewmodel_u -1.31; wait 2;
viewmodel_u -1.35; wait 2; viewmodel_u -1.39; wait 2;
viewmodel_u -1.43; wait 2; viewmodel_u -1.47; wait 2; viewmodel_u -1.51"
alias -walklower "-forward; viewmodel_u -1.53; wait 1; viewmodel_u -1.49; wait 1; viewmodel_u -1.45; wait 1; viewmodel_u -1.41; wait 1; viewmodel_u -1.37; wait 1; viewmodel_u -1.33; wait 1; viewmodel_u -1.29; wait 1; viewmodel_u -1.25; wait 1; viewmodel_u -1.21; wait 1; viewmodel_u -1.17; wait 1; viewmodel_u -1.13; wait 1; viewmodel_u -1.09; wait 1; viewmodel_u -1.05; wait 1; viewmodel_u -1.01; wait 1; viewmodel_u -0.97; wait 1; viewmodel_u -0.93; wait 1; viewmodel_u -0.89; wait 1;
viewmodel_u -0.85; wait 1; viewmodel_u -0.81; wait 1; viewmodel_u -0.77; wait 1; viewmodel_u -0.73; wait 1; viewmodel_u -0.69; wait 1; viewmodel_u -0.65; wait 1; viewmodel_u -0.61; wait 1; viewmodel_u -0.57; wait 1; viewmodel_u -0.53; wait 1; viewmodel_u -0.49; wait 1; viewmodel_u -0.45; wait 1; viewmodel_u -0.41; wait 1;
viewmodel_u -0.37; wait 1; viewmodel_u -0.33; wait 1;
viewmodel_u -0.29; wait 1; viewmodel_u -0.25; wait 1;
viewmodel_u -0.21; wait 1; viewmodel_u -0.18; wait 1;
viewmodel_u -0.15; wait 1; viewmodel_u -0.12; wait 1;
viewmodel_u -0.09; wait 1; viewmodel_u -0.10; wait 1; viewmodel_u -0.08; wait 1; viewmodel_u -0.06; wait 1;
viewmodel_u -0.04; wait 1; viewmodel_u -0.02; wait 1;
viewmodel_u 0"
« Last Edit: March 02, 2015, 05:57:47 PM by Counter-Life™ »

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
Re: [HELP] Error in .cfg
« Reply #1 on: March 02, 2015, 04:07:22 PM »
Some thing somewhere must be overwriting it, most likely skill.cfg or something else that gets executed on launch

Also, I'm guessing that "wait 1" is a custom alias? Imrite? :D
anyways, try to avoid using spaces in alias names, it can cause some weird shit

dammit- stop editing your posts ppl


EDIT: tested the script nothing is overwriting it, it's something inside - lemme check
« Last Edit: March 02, 2015, 04:13:35 PM by Pepsifan04 »
Officially Unofficial BSNOOCH Discord:
https://discordapp.com/invite/eBqezeR

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [HELP] Error in .cfg
« Reply #2 on: March 02, 2015, 04:09:42 PM »
there's a white, or hard space somewhere in the script.
removing all the spaces in the post-alias pat of the script solved the problem.


Also, I'm guessing that "wait 1" is a custom alias? Imrite? :D
anyways, try to avoid using spaces in alias names, it can cause some weird shit
Nope sorry, wait 1 is just wait 1.

Any ideas why viewmodel_u stays at -0.89?

sorry about the editing part, turned out I forgot to turn on viewmodel_adjust 1 (silly me)

But now I have this other problem.
« Last Edit: March 02, 2015, 04:11:28 PM by Counter-Life™ »

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
Re: [HELP] Error in .cfg
« Reply #3 on: March 02, 2015, 04:27:46 PM »
there's a white, or hard space somewhere in the script.
removing all the spaces in the post-alias pat of the script solved the problem.


Also, I'm guessing that "wait 1" is a custom alias? Imrite? :D
anyways, try to avoid using spaces in alias names, it can cause some weird shit
Nope sorry, wait 1 is just wait 1.

Any ideas why viewmodel_u stays at -0.89?

sorry about the editing part, turned out I forgot to turn on viewmodel_adjust 1 (silly me)

But now I have this other problem.
yes.
I've debugged this script with coulple of "echo" commands and different levels of script.

Only part of you scrip is getting executed when using +-walklower, to be more precise, only said line and everything behind it.
rest of the code is being executed on .cfg exec and never again.
I'd suggest making layered-alias structure, so:

Code: [Select]
alias +walklower "walk_lower_1;walk_lower_2;walk_lower_3;walk_lower_4"
alias walk_lower_1 "viewmodel_u ##;.....
and the same with -walklower, see if that helps.

EDIT: I don't really have time now to fix it for ya,(working hard as you can see....)
I'll be able to help more around 8/9pm
« Last Edit: March 02, 2015, 04:33:09 PM by Pepsifan04 »
Officially Unofficial BSNOOCH Discord:
https://discordapp.com/invite/eBqezeR

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [HELP] Error in .cfg
« Reply #4 on: March 02, 2015, 04:48:44 PM »
there's a white, or hard space somewhere in the script.
removing all the spaces in the post-alias pat of the script solved the problem.


Also, I'm guessing that "wait 1" is a custom alias? Imrite? :D
anyways, try to avoid using spaces in alias names, it can cause some weird shit
Nope sorry, wait 1 is just wait 1.

Any ideas why viewmodel_u stays at -0.89?

sorry about the editing part, turned out I forgot to turn on viewmodel_adjust 1 (silly me)

But now I have this other problem.
yes.
I've debugged this script with coulple of "echo" commands and different levels of script.

Only part of you scrip is getting executed when using +-walklower, to be more precise, only said line and everything behind it.
rest of the code is being executed on .cfg exec and never again.
I'd suggest making layered-alias structure, so:

Code: [Select]
alias +walklower "walk_lower_1;walk_lower_2;walk_lower_3;walk_lower_4"
alias walk_lower_1 "viewmodel_u ##;.....
and the same with -walklower, see if that helps.

EDIT: I don't really have time now to fix it for ya,(working hard as you can see....)
I'll be able to help more around 8/9pm

I did it as you said with the aliases, sadly leads to the exact same thing (viewmodel_u -0.89), maybe I just did something wrong

Thanks, I will be on Steam that time.

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
Re: [HELP] Error in .cfg
« Reply #5 on: March 02, 2015, 05:08:08 PM »
ok, fixed it. (at least it works for me)
Code: [Select]
alias -walklower "walk_lower1;walk_lower2;walk_lower3;walk_lower4;viewmodel_adjust 0"
alias "walk_lower1" "-forward;viewmodel_u -1.53;wait 1;viewmodel_u -1.49;wait 1;viewmodel_u -1.45;wait 1;viewmodel_u -1.41;wait 1;viewmodel_u -1.37;wait 1;viewmodel_u -1.33;wait 1;viewmodel_u -1.29;wait 1;viewmodel_u -1.25;wait 1;viewmodel_u -1.21;wait 1;viewmodel_u -1.17;wait 1;viewmodel_u -1.13;wait 1;viewmodel_u -1.09;wait 1;viewmodel_u -1.05;wait 1;viewmodel_u -1.01;wait 1;viewmodel_u -0.97;wait 1;viewmodel_u -0.93;wait 1;viewmodel_u -0.89;wait 1"
alias "walk_lower2" "viewmodel_u -0.85;wait 1;viewmodel_u -0.81;wait 1;viewmodel_u -0.77;wait 1;viewmodel_u -0.73;wait 1;viewmodel_u -0.69;wait 1;viewmodel_u -0.65;wait 1;viewmodel_u -0.61;wait 1;viewmodel_u -0.57;wait 1;viewmodel_u -0.53;wait 1;viewmodel_u -0.49;wait 1;viewmodel_u -0.45;wait 1;viewmodel_u -0.41;wait 1"
alias "walk_lower3" "viewmodel_u -0.37;wait 1;viewmodel_u -0.33;wait 1;viewmodel_u -0.29;wait 1;viewmodel_u -0.25;wait 1;viewmodel_u -0.21;wait 1;viewmodel_u -0.18;wait 1;viewmodel_u -0.15;wait 1;viewmodel_u -0.12;wait 1"
alias "walk_lower4" "viewmodel_u -0.09;wait 1;viewmodel_u -0.10;wait 1;viewmodel_u -0.08;wait 1;viewmodel_u -0.06;wait 1;viewmodel_u -0.04;wait 1;viewmodel_u -0.02;wait 1;viewmodel_u 0"


alias +walklower "viewmodel_adjust 1;walk_raise1;walk_raise2;walk_raise3;walk_raise4"
alias "walk_raise1" "+forward;viewmodel_u -0.02;wait 2;viewmodel_u -0.04;wait 2;viewmodel_u -0.06;wait 2;viewmodel_u -0.09;wait 2;viewmodel_u -0.12;wait 2;viewmodel_u -0.15;wait 2;viewmodel_u -0.19;wait 2;viewmodel_u -0.23;wait 2;viewmodel_u -0.27;wait 2;viewmodel_u -0.31;wait 2;viewmodel_u -0.35;wait 2;viewmodel_u -0.39;wait 2;viewmodel_u -0.43;wait 2;viewmodel_u -0.47;wait 2;viewmodel_u -0.51;wait 2;viewmodel_u -0.55;wait 2;viewmodel_u -0.59;wait 2"
alias "walk_raise2" "viewmodel_u -0.63;wait 2;viewmodel_u -0.67;wait 2;viewmodel_u -0.71;wait 2;viewmodel_u -0.75;wait 2;viewmodel_u -0.79;wait 2;viewmodel_u -0.83;wait 2;viewmodel_u -0.87;wait 2;viewmodel_u -0.91;wait 2;viewmodel_u -0.95;wait 2;viewmodel_u -0.99;wait 2;viewmodel_u -1.03;wait 2;viewmodel_u -1.07;wait 2"
alias "walk_raise3" "viewmodel_u -1.11;wait 2;viewmodel_u -1.15;wait 2;viewmodel_u -1.19;wait 2;viewmodel_u -1.23;wait 2;viewmodel_u -1.27;wait 2;viewmodel_u -1.31;wait 2"
alias "walk_raise4" "viewmodel_u -1.35;wait 2;viewmodel_u -1.39;wait 2;viewmodel_u -1.43;wait 2;viewmodel_u -1.47;wait 2;viewmodel_u -1.51"

see if this will solve your problems


EDIT: I've just realized that I've messed up  alias names (lower instead rise and vice-versa)
it works like it should, it's just the names being wrong
« Last Edit: March 02, 2015, 05:28:17 PM by Pepsifan04 »
Officially Unofficial BSNOOCH Discord:
https://discordapp.com/invite/eBqezeR

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: [HELP] Error in .cfg
« Reply #6 on: March 02, 2015, 05:57:21 PM »
ok, fixed it. (at least it works for me)
Code: [Select]
alias -walklower "walk_lower1;walk_lower2;walk_lower3;walk_lower4;viewmodel_adjust 0"
alias "walk_lower1" "-forward;viewmodel_u -1.53;wait 1;viewmodel_u -1.49;wait 1;viewmodel_u -1.45;wait 1;viewmodel_u -1.41;wait 1;viewmodel_u -1.37;wait 1;viewmodel_u -1.33;wait 1;viewmodel_u -1.29;wait 1;viewmodel_u -1.25;wait 1;viewmodel_u -1.21;wait 1;viewmodel_u -1.17;wait 1;viewmodel_u -1.13;wait 1;viewmodel_u -1.09;wait 1;viewmodel_u -1.05;wait 1;viewmodel_u -1.01;wait 1;viewmodel_u -0.97;wait 1;viewmodel_u -0.93;wait 1;viewmodel_u -0.89;wait 1"
alias "walk_lower2" "viewmodel_u -0.85;wait 1;viewmodel_u -0.81;wait 1;viewmodel_u -0.77;wait 1;viewmodel_u -0.73;wait 1;viewmodel_u -0.69;wait 1;viewmodel_u -0.65;wait 1;viewmodel_u -0.61;wait 1;viewmodel_u -0.57;wait 1;viewmodel_u -0.53;wait 1;viewmodel_u -0.49;wait 1;viewmodel_u -0.45;wait 1;viewmodel_u -0.41;wait 1"
alias "walk_lower3" "viewmodel_u -0.37;wait 1;viewmodel_u -0.33;wait 1;viewmodel_u -0.29;wait 1;viewmodel_u -0.25;wait 1;viewmodel_u -0.21;wait 1;viewmodel_u -0.18;wait 1;viewmodel_u -0.15;wait 1;viewmodel_u -0.12;wait 1"
alias "walk_lower4" "viewmodel_u -0.09;wait 1;viewmodel_u -0.10;wait 1;viewmodel_u -0.08;wait 1;viewmodel_u -0.06;wait 1;viewmodel_u -0.04;wait 1;viewmodel_u -0.02;wait 1;viewmodel_u 0"


alias +walklower "viewmodel_adjust 1;walk_raise1;walk_raise2;walk_raise3;walk_raise4"
alias "walk_raise1" "+forward;viewmodel_u -0.02;wait 2;viewmodel_u -0.04;wait 2;viewmodel_u -0.06;wait 2;viewmodel_u -0.09;wait 2;viewmodel_u -0.12;wait 2;viewmodel_u -0.15;wait 2;viewmodel_u -0.19;wait 2;viewmodel_u -0.23;wait 2;viewmodel_u -0.27;wait 2;viewmodel_u -0.31;wait 2;viewmodel_u -0.35;wait 2;viewmodel_u -0.39;wait 2;viewmodel_u -0.43;wait 2;viewmodel_u -0.47;wait 2;viewmodel_u -0.51;wait 2;viewmodel_u -0.55;wait 2;viewmodel_u -0.59;wait 2"
alias "walk_raise2" "viewmodel_u -0.63;wait 2;viewmodel_u -0.67;wait 2;viewmodel_u -0.71;wait 2;viewmodel_u -0.75;wait 2;viewmodel_u -0.79;wait 2;viewmodel_u -0.83;wait 2;viewmodel_u -0.87;wait 2;viewmodel_u -0.91;wait 2;viewmodel_u -0.95;wait 2;viewmodel_u -0.99;wait 2;viewmodel_u -1.03;wait 2;viewmodel_u -1.07;wait 2"
alias "walk_raise3" "viewmodel_u -1.11;wait 2;viewmodel_u -1.15;wait 2;viewmodel_u -1.19;wait 2;viewmodel_u -1.23;wait 2;viewmodel_u -1.27;wait 2;viewmodel_u -1.31;wait 2"
alias "walk_raise4" "viewmodel_u -1.35;wait 2;viewmodel_u -1.39;wait 2;viewmodel_u -1.43;wait 2;viewmodel_u -1.47;wait 2;viewmodel_u -1.51"

see if this will solve your problems


EDIT: I've just realized that I've messed up  alias names (lower instead rise and vice-versa)
it works like it should, it's just the names being wrong

It works! Man, you are truly the master of .cfg's!

BIG +rep!

EDIT: I made a small video about it. I also adjusted the scrip a bit, so the weapon model also goes a bit back.

https://www.youtube.com/watch?v=10zuYN1N-0o
« Last Edit: March 02, 2015, 07:27:46 PM by Counter-Life™ »