var/alist[20]
alist[1] = 1
I can't figure out what's wrong with it or what the proper syntax is that it produces this error:
chateau.dm:106:error:alist:left-hand side must be an object variable
Thanks for your help in advance.
Copyright © 2024 BYOND Software.
All rights reserved.
It works for me. Perhaps you need to put the line "alist[1] = 1" in a procedure or a verb. It's code that happens at runtime. If you want to define the contents of a list at compile time, try something like this:
var/list/alist = list(1, 2, 3, 4, 5)