Error: The following reserved word must not be used as a variable name

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
hyaray
Posts: 85
Joined: 20 Jun 2015, 01:37
Contact:

Error: The following reserved word must not be used as a variable name

12 Sep 2021, 22:52

I am gradually upgrading the code to V2-beta, and encountered the problem as shown in the figure. I don't know where the code causing the error is, so it is difficult to troubleshoot.

The amount of code is relatively large and modularization is not easy :headwall: :headwall:
image.png
image.png (67.96 KiB) Viewed 1045 times
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Error: The following reserved word must not be used as a variable name

12 Sep 2021, 23:11

  • post code
  • ctrl-f "try"
  • or run with the VS debugger attached
User avatar
hyaray
Posts: 85
Joined: 20 Jun 2015, 01:37
Contact:

Re: Error: The following reserved word must not be used as a variable name

13 Sep 2021, 00:33

swagfag wrote:
12 Sep 2021, 23:11
  • post code
  • ctrl-f "try"
  • or run with the VS debugger attached
VSCODE is a great tool, I'll have a try, thanks!! :superhappy:
safetycar
Posts: 435
Joined: 12 Aug 2017, 04:27

Re: Error: The following reserved word must not be used as a variable name

13 Sep 2021, 02:07

I was about to tell you that maybe you used a try without it being at the begining of a line

Code: Select all

asdf:="", Try asdf:="123"
(Try(asdf := "123"))
(MsgBox asdf := "123")
But I've accidentally found that some errors don't point where the error is (I guess it has to do with being more than one).

Edit: Just reported it as a bug here: viewtopic.php?f=14&t=94665
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Error: The following reserved word must not be used as a variable name

22 Sep 2021, 21:03

that would have been the Visual Studio debugger, but whatever. nothing to do with vscode whatsoever

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: No registered users and 41 guests