ID:1361932
 
(See the best response by Neimo.)
Code:
obj/var/Drop_Range = list()

obj/books/

firebolt
Drop_Range = (0, 5)


Problem description:

I seem to not be understanding lists like I used to, help me out please? Basically I want the list to contain in the first slot to be a 0 and the second one to be 5 for fire bolt book only. There are also many other books too. :)

I know I could do:

obj/var/Drop_Range = list()

obj/books/

firebolt
Drop_Range.Add(0)
Drop_Range.Add(5)



But that is no fun...
Best response
Well you must define the Drop_Range variable as a list:

obj/var/list/Drop_Range = new
Thank you.
In response to Ripper man5
You're welcome!
Neimo do not let your membership run down so low that scares me :'(
In response to Ripper man5
It just spontaneously increased. I wonder who could have done that, I thank whomever did that generous deed. :)
You're welcome!
I know this is kind of late, however I felt the need to comment just because I think this might come in handy for you.

lists use a lot of memory, even empty ones. When a game has a lot of memory it cause said game to run slow even when CPU is at 0. Therefore, it would be idea to have your list variable set to null, and then set it to a list when needed.

Granted, this will require list checks in procedures dealing with the list e.g. if(istype(src.Drop_list,/list/)), but ultimately has all pros and no cons.

In addition, it is also idea to never have a variable set to root. By making it obj/var/list/Drop_rang, every single object in the game will have that variable. So, if obj/books will be the only things to use Drop_rang, then apply that variable only to this. Variables also create memory bulk. I'm not trying to nag or criticize, I just noticed something done and figured I'd point out a potential problem it might cause.

What I feel should be how you approach what I've seen:
obj/books/
var/list/Drop_Range//if it is at all possible, create a sub_tree
//for objects that use Drop_Range
firebolt
Drop_Range = list(0,5)//list was the only thing your script was missing