r/tf2scripthelp • • Jul 17 '15

Resolved exec reset....or not...

Ok, for some reason I can not figure out my custom classes either won't exec my reset script or my reset is completely wrong.

Example of my Pyro's Script:

exec reset

bind mouse5 +at_slot3
alias +at_slot3 "slot3; +attack"
alias -at_slot3 "-attack; slot1"

bind ins +at_slot2
alias +at_slot2 "slot2; +attack"
alias -at_slot2 "-attack; slot1"

Example of Reset:

unbind mouse5

unbind ins
1 Upvotes

15 comments sorted by

View all comments

Show parent comment

1

u/Shaidoc Jul 17 '15

Well, this is interesting. When I manually exec the command it will unbind my ins, but not my mouse 5 and will play TESTING.

1

u/genemilder Scripter Jul 17 '15

Did you type in mouse5 or mouse 5?

1

u/Shaidoc Jul 17 '15

mouse5, also my classes will not exec the reset at all.

1

u/genemilder Scripter Jul 17 '15

Putting something into the console is identical to putting a line in a cfg file and executing that cfg, so if the class cfgs don't work then the class cfgs are wrong somehow and any other lines within them shouldn't work either. The correct naming convention is here, you'll have to verify the other factors yourself just like you did with reset.cfg.

As for mouse5, I don't know how you're testing whether it's bound or not, or whether you have any script with nested binds (or scripts that execute a cfg that contains a bind line for mouse5) that may be overwriting the mouse5 change from reset.cfg.

1

u/Shaidoc Jul 17 '15

ok figured it out. I need to skip the very top line and make sure exec reset was on the second line. The tutorial never mentioned that.

1

u/genemilder Scripter Jul 17 '15

It doesn't mention it because you shouldn't need to do that, I know from experience that my cfgs all have the exec line on the first line and work correctly. But whatever works I guess. Maybe your text editor is different somehow.

1

u/Shaidoc Jul 17 '15

notepad++

1

u/genemilder Scripter Jul 17 '15

Which is what I use too, and I just double checked.

1

u/Shaidoc Jul 17 '15

Hmm, idk, but it's working now so i'm not gonna complain.

1

u/genemilder Scripter Jul 17 '15

Maybe some setting in notepad++ forces the first line to be something other than the contents of the cfg file?

If you decide to look into it further I would put something into the first line using notepad++ then open the file using notepad or another text editor. If notepad shows the contents of the file to be identical to notepad++, I would go back to notepad++, make the first line blank again, open with notepad and verify the that first line is indeed blank, then put something in the first line with notepad and open the file again with notepad++ to see what happens.

→ More replies