var/list/MonList //Creates the list
for(var/i = 1 to 15) //Loops through 15 elements
MonList[i] = new/mob/monsters/Muscrat //Assigns it to a new instance
MonList[i].name = "Hyper Muscrat" //Expected end of Statement error here
MonList[i].Strength += 500//Expected end of statement here
MonList[i].BattleNum = NPCFightCount //Expected end of statement here
Problem description:
areas.dm:200:error: .: expected end of statement
areas.dm:201:error: .: expected end of statement
areas.dm:202:error: .: expected end of statement
It spits out these errors.
--There's no need to use the index number like you have; and it won't work either, that syntax is of associated lists. Just use the += operator (or Add() proc), and it will have the desired effect (adding the item to list in the last position), anyway.
--You can't access an object's variables by using it's value directly from the list. This should be pretty obvious, especially with the '.' operator since the compiler can't know what kind of an object is in the list therefore can't know it's variables.
Instead, you need to typecast a var as an object, and store the object reference from the list to it.
Fixed code:
THOUGH, in this case, you're just creating the object and you don't need to resort to that at all...just do it like this: