CommandHelper

CommandHelper

46.5k Downloads

Dynamic indices in array() creation cause a compile error.

LadyCailinBot opened this issue · 5 comments

commented

CMDHELPER-2888 - Reported by CyaNox

The following code:

{code:title=test2.ms}
@A = 'a'
@b = 2
@c = array(@A: @b)


Produces:

root@qubetubers:/srv/mc/scripts/sk89q# java -jar CommandHelper.jar cmdline test2.ms
COMPILE ERROR: Invalid label specified
:/srv/mc/scripts/sk89q/test2.ms:3

commented

Comment by LadyCailin

This is a feature, not a bug. This will be used for optimizations in the future. I can however improve the error message.

commented

Comment by LadyCailin

This will be fixed in the next build. An error message specifically stating that variables cannot be used is now shown.

commented

Comment by mattman00000

This page is the only google result for "Invalid label specified" and I'm getting that error from code that worked fine. No idea what changed aside from updating commandhelper. Uh, what do.

EDIT: uh, I fixed it somehow by taking out an alias that was formatted like

/c = //butcher

Not sure if there's an issue with doubleslash worldedit commands and aliases.

commented

Comment by LadyCailin

Ah. Double slashes are now comments, so that caused a breakage, I think. /c = '//butcher' should work though.

commented

Comment by 성훈.류

Hello. (I'm not good at English,sorry)

@a = 'a'
@b = 2
@c = array(@a: @b)
msg(@c)

'''output'''

{: 2}

I want this output. But output is not same.

{a: 2}

What's wrong?