ID:146364
 
Code:
usednames.Add("[usr.name], ") or usednames.Add(usr.name)

Problem Description:

Why is it that whenever I need to used the list.Add() , list.Remove(), and so on procs I get runtimes saying: can't execute null.Add.
There isn't anything wrong with that is there?



FinalFantasyGamer wrote:
Code:
> usednames.Add("[usr.name], ") or usednames.Add(usr.name)
>

Problem Description:

Why is it that whenever I need to used the list.Add() , list.Remove(), and so on procs I get runtimes saying: can't execute null.Add.
There isn't anything wrong with that is there?




Your list is null so there's nothing there to Add() to or Remove() from. Before you can use a list, it needs to be initialized to an empty list. Here's one way of doing that:
var/list/L = list()
In response to Jon88
Thanks I got it.