ID:2277773
 
(See the best response by Ter13.)
undeadrising.dm
/datum/event/undead
announceWhen = 100
endWhen = 600

var/list/spawned_undead = list()

/datum/event/undead/setup
announceWhen = rand(50, 100)
endWhen = rand(600, 1000)

/datum/event/undead/announce()
var/announcement = ""
if(severity == EVENT_LEVEL_CITY)
announcement = "There are multiple sightings of dead and buried rising up from their graves, attempting to attack civilians!"
command_announcement.Announce(annoucement, "Breaking news!")

/datum/event/undead/start
if(severity == EVENT_LEVEL_CITY)
spawn_undead(landmarks_list.len)
else if(severity == EVENT_LEVEL_CITY)
spawn_undead(rand(5, 7))
else
spawn_undead(rand(2, 3))

/datum/event/undead/proc/spawn_undead(var/num_groups, var/group_size_min = 5, var/group_size_max = 7)
var/list/spawn_locations = list()

for(var/obj/effect/landmark/C in landmarks_list)
if(C.name == "undeadspawn")
spawn_locations.Add(C.loc)
spawn_locations = shuffle(spawn_locations)
num_groups = min(num_groups, spawn_locations.len)

var/i = 1
while (i <= num_groups)
var/group_size = rand(group_size_min, group_size_max)
for (var/j = 1, j <= group_size, j++)
if(prob(100))
spawned_undead.Add(new /mob/living/simple_animal/hostile/undead
i++

/datum/event/undead/end()
for(var/mob/living/simple_animal/hostile/undead in spawned_undead)
if(!C.stat)
var/turf/T = get_turf(C)
if(istype(T, /turf/space))
qdel(C)


Problem occurs on line 22, where it claims "here" to be a bad argument definition. How can I fix this?

Which line is 22?
In response to MisterPerson
On the /datum/event/undead/start there is a single "here", between the spawn groups lines.
Best response
/datum/event/undead/start


This line is missing its parentheses.

/datum/event/undead/start()
if(severity == EVENT_LEVEL_CITY)
spawn_undead(landmarks_list.len)
else if(severity == EVENT_LEVEL_CITY)
spawn_undead(rand(5, 7))
else
spawn_undead(rand(2, 3))
In response to Ter13
Thank you! Apparently I have forgotten several parenthesis! Thank you for helping me with this!