Macro: var names with underscores

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderators: Moderators, Developers

Message
Author
Amarock
Noob
Noob
Posts: 8
Joined: 26 Jun 2010, 15:37
Noob?: Yes
Location: France

Macro: var names with underscores

#1 Post by Amarock »

Hello friends...

For some hour I trying to write macro and I obtain "unrecognized assignment" error.

After some tries, I discovered the that variable names in macro should not have underscore.

Code: Select all

$my_message = Hello # is wrong
$myMessage = Hello  # is good
If it's really the case, please add this information on the macro manual. :?

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: unrecognized assignment

#2 Post by EternalHarvest »

Amarock wrote:If it's really the case, please add this information on the macro manual. :?
Examine macro plugin's sources, discover that it's really the case.

Actually, maybe that should be fixed.

Amarock
Noob
Noob
Posts: 8
Joined: 26 Jun 2010, 15:37
Noob?: Yes
Location: France

Re: unrecognized assignment

#3 Post by Amarock »

In fact I'm a little bit confused :oops:

On the Macro manual it's indicated :
Note: Variable names may only contain letters and numbers.
I have so the habit to use underscore that I certainly imagine that is a letter... :roll:

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: unrecognized assignment

#4 Post by EternalHarvest »

I'm for adding underscores too (btw, macro Perl subroutine names are like that too).

User avatar
kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

Re: unrecognized assignment

#5 Post by kLabMouse »

EternalHarvest wrote:I'm for adding underscores too (btw, macro Perl subroutine names are like that too).
Agree.

Locked