ID:149340
 
I was recently toying around with arrays in BYOND, as I never exactly needed to use one before in BYOND.

I stumbled across this peculiar error:

obj var stuff[50] Thinger stuff[5] = 15

Test.dm:5:error:stuff:left-hand side must be an object variable

I don't see the problem with the code, but that is why I'm posting this here now, isn't it? ;)

Thank yap.
Malver wrote:
I was recently toying around with arrays in BYOND, as I never exactly needed to use one before in BYOND.

I stumbled across this peculiar error:

<code> > obj > var > stuff[50] > Thinger > stuff[5] = 15 > </code>

Test.dm:5:error:stuff:left-hand side must be an object variable

I don't see the problem with the code, but that is why I'm posting this here now, isn't it? ;)

You can initialize a list at compile-time, but not an individual element of it. For example, stuff=list(1,3,6,10,15) is legal, but stuff[5]=5 is not. The latter is valid only at runtime.

Lummox JR