ID:148560
 
var/list/players[]
var/mob/player/P
for(P in world)
players.Add(P)
players.Add("Cancel")


No errors on compile, but runtime error that null.Add() can't be executed... please help. Thanks in Advance,

-Nova
Nova2000 wrote:
var/list/players[]
> var/mob/player/P
> for(P in world)
> players.Add(P)
> players.Add("Cancel")

No errors on compile, but runtime error that null.Add() can't be executed... please help. Thanks in Advance,

Add in:

world
New()
players = new

I think that should do that trick.
In response to Skysaw
Skysaw wrote:
Nova2000 wrote:
var/list/players[]
> > var/mob/player/P
> > for(P in world)
> > players.Add(P)
> > players.Add("Cancel")

No errors on compile, but runtime error that null.Add() can't be executed... please help. Thanks in Advance,

Add in:

world
New()
players = new

I think that should do that trick.

These would work too:
var/list/players[0]
var/list/players = list()
In response to Ebonshadow
Nope, still not working... I have 2 places like this, login and booting...

Login Code:

var/list/adminlist[0]

if(adminlist.Find(ckey) != 0)
new_mob = new /mob/player/admin/()
In response to Nova2000
Have you tried this?

<code>var/adminlist[0] //Notice the removal of "/list"</code>