Lists & using new() in Developer Help
|
|
Is there a way to use list associations without always having to check for the list & making a new one (else get a bad index error)??
PatchUp() if(!Number) Number=new() if(!MissingNumber) MissingNumber=new() if(Number[src]==(MissingNumber[src.Village]+1)) Number[src]--; MissingNumber[src.Village]++
|
Can you just define them with it? What are the ramifications of that if you can?
var/list MissingNumber[]=new() Number[]=new()
|
|
But make sure you never do MissingNumber = null to empty list, better MissingNumber = list()